Javascript examples for DOM HTML Element:Textarea
Textarea value Property - Get the contents of a text area:
<!DOCTYPE html> <html> <body> Address:<br> <textarea id="myTextarea"> Main Street//from w w w. j av a 2 s . com New York</textarea> <button type="button" onclick="myFunction()">Test</button> <script> function myFunction() { var v = document.getElementById("myTextarea").value; console.log(v); } </script> </body> </html>