Name
Textarea: a multiline text input area — DOM Level 2 HTML: Node → Element → HTMLElement → Textarea
Properties
-
String defaultValue The initial content of the text area. When the form is reset, the text area is restored to this value. Setting this property changes the displayed text in the text area.
-
readonly Form form The Form object that represents the
<form>element containing this Textarea, ornullif this element is not inside a form.-
readonly String type The type of this element, for compatibility with Input objects. This property always has the value “textarea”.
-
String value The text currently displayed in the text area. The initial value of this property is the same as the
defaultValueproperty. When the user types into this element, thevalueproperty is updated to match the user’s input. If you set thevalueproperty explicitly, the string you specify is displayed in the Textarea object. Thisvalueproperty contains the text that is sent to the server when the form is submitted.
In addition to these properties, Textarea objects also mirror HTML attributes with the following properties:
|
Property |
Attribute |
Description |
|
|
|
Keyboard shortcut character |
|
|
|
The width in character columns |
|
|
|
Whether the Textarea is disabled |
|
|
|
Textarea name for form submission and element access. |
|
|
|
Whether the Textarea is noneditable |
|
|
|
Height ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access