HTMLTextAreaElement
The textarea element is represented by the HTMLTextAreaElement object. It defines the methods and properties described in the following table.
Name | Description | Returns |
---|---|---|
autofocus | the autofocus attribute | boolean |
checkValidity() | Performs input validation on the element | boolean |
cols | the cols attribute | number |
dirName | the dirName attribute | string |
disabled | the disabled attribute | boolean |
focus | set the focus to the textarea control | void |
form | Returns the form that this element is associated with | HTMLFormElement |
labels | Returns the label elements associated with this element | HTMLLabelElement[] |
maxLength | the maxlength attribute | number |
name | the name attribute | string |
placeholder | the placeholder attribute | string |
readOnly | the readonly attribute | boolean |
required | the required attribute | boolean |
rows | the rows attribute | number |
setCustomValidity(<msg>) | Sets a custom validation message | void |
textLength | Returns the length of the value attribute | number |
type | Returns textarea | string |
validationMessage | Returns the error message that would be shown to the user if input validation was applied | string |
value | Returns the content of the element | string |
willValidate | Returns true if the element will be subject to input validation when the form is submitted; returns false otherwise | boolean |
wrap | the wrap attribute | string |
Home
JavaScript Book
DOM
JavaScript Book
DOM
HTMLTextAreaElement:
- HTMLTextAreaElement
- focus: set the focus to the textarea control