Home >Web Front-end >HTML Tutorial >HTML不常用元素:optgroup_html/css_WEB-ITnose

HTML不常用元素:optgroup_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:22:10921browse

在网页表单中,元素用于在

这个元素包含两个属性:disabled和label。

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>

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn