value

HTML (DHTML)

value Property

Internet Development Index

Retrieves or sets the text in the entry field of the textArea element.

Syntax

HTMLN/A
ScriptingTEXTAREA.value [ = sValue ]

Possible Values

sValueString that specifies or receives the text in the entry field of the element.

The property is read/write. The property has no default value.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties.

Remarks

Setting this property replaces any existing text in the element.

Example

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>

Standards Information

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 Non-Microsoft link.

Applies To

TEXTAREA