JavaScript string newline character?
I’ve just tested a few browsers using this silly bit of JavaScript: Run code snippetExpand snippet IE8 and Opera 9 on Windows use \r\n. All the other browsers I tested (Safari 4 and Firefox 3.5 on Windows, and Firefox 3.0 on Linux) use \n. They can all handle \n just fine when setting the value, though IE and Opera … Read more