Textarea.defaultValue : TextArea : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » TextArea »

 

Textarea.defaultValue








The defaultValue property contains the text between the beginning and ending

This property is often used to reset areas to their default values after a user has modified them.












<html>
    <head>
    <script language="JavaScript">
    <!--
    function resetForm(){
      document.myForm.myTextArea.value = document.myForm.myTextArea.defaultValue;
    }
    -->
    </script>
    </head>
    <body>
    <b>Edit the text in the following text box:</b>
    <P>
    <form name="myForm">
        <textarea name="myTextArea" rows=cols=50>
        Here is some text in my text area.
      </textarea>
    <input type=BUTTON value="Click to Reset" name="myButton"
             onClick="resetForm()">
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» TextArea