my coding:
...
<textarea name="TextArea1" id="TextArea" style="height ; width" ></textarea>
...
<script type="text/javascript">
var txt_element = document.getElementById("TextArea");
document.write (txt_element.childNodes[0].nodeValue);
</script>
...
but it doesn’t recognize “enter/return” key hited instead it shows ” “
Many thanks
Text areas use
\nto designate a new line, something along these lines should work:Not sure if you’re just goofing around, but I feel compelled to mention that generally speaking you should never use document.write().