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

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

HTML <optgroup>标签


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

Definition and Usage
定义和用法

Defines an option group. This element allows you to group choices. When you have a long list of options, groups of related choices are easier to handle.
定义一个选项组。该元素可以使你选择某个选项组中所对应的选项。如果你的选项列表太长,使用这个方法可以标出具体选项所对应的选项组,从而方便你进行相关选项的选择。


Differences Between HTML and XHTML
HTML和XHTML的不同

NONE 无


Example
案例

Source
源代码
Output
输出结果
<select>
<optgroup label="Swedish Cars">
<option value ="volvo">Volvo</option>
<option value ="saab">Saab</option>
</optgroup>
<optgroup label="German Cars">
<option value ="mercedes">Mercedes</option>
<option value ="audi">Audi</option>
</optgroup>
</select>


Required Attributes
必要属性

DTD indicates in which DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.
DTD 包含了DTD中所允许使用的属性。S=严格精确   T=可变动  F=框架结构

Attribute
属性
Value
Description
描述
DTD
label text_label Defines the label for the option group
定义了指定选项组的标签
STF

Optional Attributes
可选属性

Attribute
属性
Value
Description
描述
DTD
disabled disabled Disables the option-group when it first loads
第一次加载时,不执行选项组功能
STF

Standard Attributes
标准属性

id, class, title, style, dir, lang, xml:lang

For a full description, go to Standard Attributes.
如果你想查阅完整的属性描述,可以点击标准属性查阅。

Event Attributes
事件属性

tabindex, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup

For a full description, go to Event Attributes.
如果你想查阅完整的属性描述,可以点击事件属性查阅。

评论 (0) All

登陆 | 还没注册?