DOM Textarea Object
The Textarea object represents a text-area in an HTML form.
For each <textarea>
tag in an HTML form, a Textarea object is created.
The Textarea object can be accessed by indexing the elements array (by number or name) of the form or by using getElementById().
Properties
Property | Description |
---|---|
cols |
Sets or returns the width of a textarea |
defaultValue |
Sets or returns the default text in a textarea |
disabled |
Sets or returns whether or not a textarea should be disabled |
form |
Returns a reference to the form that contains the textarea |
name |
Sets or returns the name of a textarea |
readOnly |
Sets or returns whether or not a textarea should be read-only |
rows |
Sets or returns the height of a textarea |
type |
Returns the type of the form element |
value |
Sets or returns the text in a textarea |
Methods
Method | Description |
---|---|
select() |
Selects the text in a textarea |
Standard Properties and Methods
This object also supports the standard properties and methods.
Standard Events
This object also supports the standard events.