Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Textarea Object

HTML DOM Textarea Object


The Textarea object

The Textarea object represents a textarea in an HTML form.

Each of the HTML form. autofocusSets or returns whether the textarea automatically gets focus. Yes colsSets or returns the width of the textarea. Yes defaultValueSets or returns the initial content of the text box. Yes disabledSets or returns whether the textarea should be disabled. Yes formReturns a reference to the form object that contains the textarea. Yes maxLengthSets the maximum number of characters that can be entered in the textarea element. Yes nameSets or returns the name of the textarea. Yes placeholderSets or returns the value of the placeholder attribute. Yes readOnlySets or returns whether the textarea should be read-only. Yes requireSets or returns whether the textarea is required. Yes rowsSets or returns the height of the textarea. Yes typeReturns the form type of the text box. Yes valueSets or returns the text in the textarea. Yes

Textarea Object Methods

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

Standard properties and events

The Textarea object also supports standard property and Events.