value property
Retrieves or sets the text in the entry field of the textArea element.
Syntax
| JavaScript | |
|---|
Property values
Type: String
the text in the entry field of the element.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
Remarks
Setting this property replaces any existing text in the element.
Examples
In this example, when the user clicks the text area, the alert displays the value "This is the value of a textarea".
<textarea onclick="alert(this.value)">
This is the value of a textarea.
</textarea>
See also
Show: