I have a <textarea>
that I want to print the contents on the page below it. When it does this I want to make random words be omitted.
I have accomplished this. My problem is I want make it recognize when the enter button has been pushed in the <textarea>
and display that below. I want those to not ever be omitted. I have gotten it so that when a <br/>
is typed into the <textarea>
it will not omit those and it will show the new lines. When I tried doing that with the \n
it does not seem to recognize in the .value
of the object that the enters are \n
.
Any ideas how to fix this?
I also tried var txtAdd = document.getElementById('textLoc').value.replace("\n","<br/>");
and it did not work.