The type property returns the type of the text area.
This always returns textarea.
<html> <head> <script language="JavaScript1.1"> <!-- function getType(){ alert("The name of this text area is " + document.myForm.elements[0].type); } --> </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="Get Type" name="myButton" onClick='getType()'> </form> </body> </html>