当前位置: 首页 > 网络学院 > 网页制作基础教程 > HTML > HTML <textarea>标签

HTML
HTML Head
HTML Meta
HTML URLs
HTML Scripts
HTML 属性
HTML 事件
HTML URL-encode
HTML Web服务器
HTML 摘要
HTML 实例
标签列表
标准属性
事件属性
ASCII码
特殊字符
HTTP状态消息

HTML <textarea>标签


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-03-04   浏览: 433 ::
收藏到网摘: n/a

定义与用法

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控件)。用户可以在里面书写文字。字数没什么限制。默认的字体是固定的。


在HTML和XHTML中的区别

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.
怎样建立文字区域

评论 (0) All

登陆 | 还没注册?