type property (textarea)
Returns the type of a textarea element.
This is a left-over property, from the time when the textarea was an input element.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
Possible values:
String that represents the element type.
Only the following value is possible:
Element is a TextArea object. |
Default: textarea.
Example HTML code 1:
This example illustrates the use of the type property:
|
||||
<head> <script type="text/javascript"> function GetAreaType (elem) { alert ("The type of element: " + elem.type); } </script> </head> <body> <textarea onclick="GetAreaType (this)">Click this text!</textarea> </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by objects:
HTML elements:
External links:
User Contributed Comments