w3pop.com :: 网络学院 :: HTML :: HTML <optgroup>标签
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.
定义一个选项组。该元素可以使你选择某个选项组中所对应的选项。如果你的选项列表太长,使用这个方法可以标出具体选项所对应的选项组,从而方便你进行相关选项的选择。
NONE 无
| 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> |
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 |
| Attribute 属性 |
Value 值 |
Description 描述 |
DTD |
|---|---|---|---|
| disabled | disabled | Disables the option-group when it first loads 第一次加载时,不执行选项组功能 |
STF |
| id, class, title, style, dir, lang, xml:lang |
For a full description, go to Standard Attributes.
如果你想查阅完整的属性描述,可以点击标准属性查阅。
| tabindex, onclick, ondblclick, onmousedown, onmouseup, onmouseover, onmousemove, onmouseout, onkeypress, onkeydown, onkeyup |
For a full description, go to Event Attributes.
如果你想查阅完整的属性描述,可以点击事件属性查阅。
评论 (0)
All