You are here: Reference > JavaScript > client-side > HTML DOM > properties > type (textarea)

type property (textarea)

Browser support:
Returns the type of a textarea element.
This is a left-over property, from the time when the textarea was an input element.


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:
    <script type="text/javascript">
        function GetAreaType (elem) {
            alert ("The type of element: " + elem.type);
    <textarea onclick="GetAreaType (this)">Click this text!</textarea>
Did you find this example helpful? yes no

Supported by objects:

External links:

User Contributed Comments

Post Content

Post Content