Textarea.name : TextArea : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » TextArea »

 

Textarea.name








The name property returns the name of the text area.

This property is often accessed via the elements array of a Form object and used to return the name of the text area.












<html>
    <head>
    <script language="JavaScript">
    <!--
    function getName(){
      alert("The name of this text area is " + document.myForm.elements[0].name);
    }
    -->
    </script>
    </head>
    <body>
    <form name="myForm">
      <textarea name="myTextArea" rows=cols=50>
      Here is some text in my text area.
      </textarea>
      <input type=BUTTON value="Get Name" name="myButton" onClick='getName()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» TextArea