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