KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
In IE when I insert text into a <pre> tag the newlines are ignored: <pre id="putItHere"></pre> <script> function putText() { document.getElementById("putItHere").innerHTML = "first line\nsecond line"; } </script> Using \r\n instead of a plain \n does not work. <br/> does work but inserts an extra blank line in FF, which is not acceptable for my purposes.
Tags (comma-separated)
Save Edits
Cancel