+ 4
How to create a new line in javascript
I don't remember if it was \n or something like this and don't know how to implement it in doc.write
6 Answers
+ 4
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 will convert that back to \r\n again internally. There's a SitePoint article with some more details called Line endings in Javascript.
Note also that this is independent of the actual line endings in the HTML file itself (both \n and \r\n give the same results).
https://stackoverflow.com/questions/1155678/javascript-string-newline-character
+ 3
\n
+ 2
POONAM can you give an example?
+ 2
Dai Abdesslam great, thanks.
+ 2
//pascal_rabbit you're welcome
+ 1
\n can be used