Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Textarea object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Textarea object


Textarea object

The Textarea object represents a text-area in an HTML form.

Each of the HTML form's tags creates a Textarea object.

You can access a Textarea object by indexing an array of elements for the form, or use getElementById().


Textarea object properties.

W3C: W3C standard.

Attributes describe W3C
cols Set or return the width of TextArea. Yes
defaultValue Set or return to the initial content in the text box. Yes
disabled Set or return to TextAREA should be disabled. Yes
form Returns a reference to a form object that contains the textarea. Yes
name Set or return to the name of TextArea. Yes
readOnly Set or return to TextArea whether it should be read-only. Yes
rows Set or return the height of TextArea. Yes
type Returns the form type of the text box. Yes
value Set or return text in Textarea. Yes

Textarea object method

method describe W3C
select() Select the text in TextArea. Yes

Standard properties and events

Textarea objects also support standard properties and events.