星空网 > 软件开发 > 网页设计

HTML不常用元素:optgroup

网页表单中,<optgroup>元素用于在<select>元素中创建一组选项<option>。这个可以更好的区分每一个组选项之间的区别。

这个元素包含两个属性:disabledlabel

disabled:表示选项组无法被选择

label:表示选项组的名字

 1 <select> 2   <optgroup label="Group 1"> 3     <option>Option 1.1</option> 4   </optgroup> 5   <optgroup label="Group 2"> 6     <option>Option 2.1</option> 7     <option>Option 2.2</option> 8   </optgroup> 9   <optgroup label="Group 3" disabled>10     <option>Option 3.1</option>11     <option>Option 3.2</option>12     <option>Option 3.3</option>13   </optgroup>14 </select>

 




原标题:HTML不常用元素:optgroup

关键词:HTML

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

张君维:https://www.goluckyvip.com/tag/48691.html
张丽俊:https://www.goluckyvip.com/tag/48692.html
张绿明 Kevin鳄鱼老师 :https://www.goluckyvip.com/tag/48693.html
张曼 Helena :https://www.goluckyvip.com/tag/48694.html
张梦佳:https://www.goluckyvip.com/tag/48695.html
张培培:https://www.goluckyvip.com/tag/48696.html
深圳有没有比较好玩的景点 深圳有没有比较好玩的景点推荐一下:https://www.vstour.cn/a/366175.html
长治婚庆女司仪和主持人:https://www.vstour.cn/a/366176.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流