Mega Code Archive

 
Categories / JavaScript Tutorial / Form
 

Textarea value

The value property returns the current value of the text area. <html>     <head>     <script language="JavaScript">     <!--     function resetText(){       document.myForm.myTextArea.value = document.myForm.myTextArea.defaultValue;     }     -->     </script>     </head>     <body>     <form name="myForm">       <textarea name="myTextArea" rows=6 cols=50>       Here is some text in my text area.       </textarea>       <input type=BUTTON value="Reset" name="myButton" onClick='resetText()'>     </form>     </body>     </html>