Created
December 9, 2013 05:22
-
-
Save thirdj/7867692 to your computer and use it in GitHub Desktop.
How to replace \n with <br /> in JavaScript?
http://jsfiddle.net/ZmW45/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('textarea').val().replace(/\n/g, '<br />'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mom
wow