HTML DOM Textarea Object

« Previous Chapter Next Reference »

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.

You can access a Textarea object by indexing the elements array (by number or name) of the form or by using getElementById().

Textarea Object Properties

W3C: W3C Standard.

Property Description W3C
cols Sets or returns the width of a textarea Yes
defaultValue Sets or returns the default text in a textarea Yes
disabled Sets or returns whether or not a textarea should be disabled Yes
form Returns a reference to the form that contains the textarea Yes
name Sets or returns the name of a textarea Yes
readOnly Sets or returns whether or not a textarea should be read-only Yes
rows Sets or returns the height of a textarea Yes
type Returns the type of the form element Yes
value Sets or returns the text in a textarea Yes

Textarea Object Methods

Method Description W3C
select() Selects the text in a textarea Yes

Standard Properties, Methods, and Events

The Textarea object also supports the standard properties, methods, and events.

« Previous Chapter Next Reference »

Have Any Suggestion? We Are Waiting To Hear from YOU!

Your Query was successfully sent!