HTML DOM Textarea objects
Textarea object
Textarea object represents an HTML form in a text field (text-area).
Each <textarea> tag HTML form, can create a Textarea object.
You can form the corresponding element of the array to access a Textarea object by indexing, or use getElementById ().
Textarea object properties.
W3C: W3C standards.
属性 | 描述 | W3C |
---|---|---|
cols | 设置或返回 textarea 的宽度。 | Yes |
defaultValue | 设置或返回文本框中的初始内容。 | Yes |
disabled | 设置或返回 textarea 是否应当被禁用。 | Yes |
form | 返回对包含该 textarea 的表单对象的引用。 | Yes |
name | 设置或返回 textarea 的名称。 | Yes |
readOnly | 设置或返回 textarea 是否应当是只读的。 | Yes |
rows | 设置或返回 textarea 的高度。 | Yes |
type | 返回该文本框的表单类型。 | Yes |
value | 设置或返回在 textarea 中的文本。 | Yes |
Textarea object methods
方法 | 描述 | W3C |
---|---|---|
select() | 选择 textarea 中的文本。 | Yes |
Standard properties and events
Textarea object also supports the standard attributes and events .