当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <textarea>标签
Defines a text-area (a multi-line text input control). A user can write text in the text-area. In a text-area you can write an unlimited number of characters. The default font in the text-area is fixed pitch.
定义文字输入区域(多行文字输入的input控件)。用户可以在里面书写文字。字数没什么限制。默认的字体是固定的。
NONE
无
代码 | 输出结果 |
---|---|
<textarea rows="2" cols="20"> The cat was playing in the garden. Suddenly a dog showed up..... </textarea> |
DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
下表中的DTD列指明了被支持的DTD属性。S=Strict(精确的),T=Transitional(传统的),F=Frameset(框架)
属性 | 值 | 描述 | DTD |
---|---|---|---|
cols | number | Specifies the number of columns visible in the text-area 指定在文字区域内可见的列数 | STF |
rows | number | Specifies the number of rows visible in the text-area 指定在文字区域内可见的行数 | STF |
属性 | 值 | 描述 | DTD |
---|---|---|---|
disabled | disabled | Disables the text-area when it is first displayed 当第一次加载的时候文字区域不可用 | STF |
name | name_of_textarea | Specifies a name for the text-area 指定文字区域的name | STF |
readonly | readonly | Indicates that the user cannot modify the content in the text-area 文字区域内的内容不可修改 | STF |
id, class, title, style, dir, lang, xml:lang, tabindex, accesskey |
For a full description, go to Standard Attributes.
查看完整的属性
onfocus, onblur, onselect, onchange, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
查看完整的属性
Textarea
How to create a text-area.
怎样建立文字区域