The Textarea object represents a text-area in an HTML form.
For each <textarea> tag in an HTML form, a Textarea object is created.
You can access a Textarea object by indexing the elements array (by number or name) of the form or by using getElementById().
Note: The Textarea object can also use the properties/methods of:
W3C: W3C Standard.
| Property | Description | W3C |
|---|---|---|
| cols | Sets or returns the width of a text area | Yes |
| defaultValue | Sets or returns the default value of a text area | Yes |
| disabled | Sets or returns whether the text area is disabled, or not | Yes |
| form | Returns a reference to the form that contains the text area | Yes |
| name | Sets or returns the name of a text area | Yes |
| readOnly | Sets or returns whether the contents of a text area is read-only | Yes |
| rows | Sets or returns the height (in rows) of a text area | Yes |
| type | Returns the type of the form element the text area is | Yes |
| value | Sets or returns the contents of a text area | Yes |
| Method | Description | W3C |
|---|---|---|
| select() | Selects the entire contents of a text area | Yes |
The Textarea object also supports the standard properties and events.
Your message has been sent to W3Schools.