Search w3schools.com:

SHARE THIS PAGE

HTML DOM Textarea Object


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().

Note: The Textarea object can also use the properties/methods of:


Textarea Object Properties

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

Textarea Object Methods

Method Description W3C
select() Selects the entire contents of a text area Yes

Standard Properties and Events

The Textarea object also supports the standard properties and events.



Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]