Originally Posted by Airblader
Actually you can use \r\n (both needed for Windows). But why are you surprised it shows up as '\n' if you escape it to '\\n'?
document.getElementById('myTextarea').value = 'Hi!\r\nThis is a new line';
That works just fine ( http://jsfiddle.net/N6fNB/
I wasn't surprised. I knew that would happen. I also wasn't surprised that "<br>" showed up but in all of my searching for a solution those were more often then not suggested. I just wanted to show that it DIDN'T work to avoid getting those answers.