实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
AخA
 
1
<link href="//cdn.bootcss.com/select2/3.5.4/select2.min.css" rel="stylesheet"/>
2
<script src="//cdn.bootcss.com/jquery/1.7.1/jquery.min.js">
3
</script>
4
<script src="//cdn.bootcss.com/select2/3.5.4/select2.min.js">
5
</script>
6
<p>
7
    <select id="e17" style="width:300px" class="populate">
8
    <optgroup label="Alaskan/Hawaiian Time Zone">
9
        <option value="AK">Alaska</option>
10
        <option value="HI">Hawaii</option>
11
    </optgroup>
12
    <optgroup label="Pacific Time Zone">
13
        <option value="CA">California</option>
14
        <option value="NV">Nevada</option>
15
        <option value="OR">Oregon</option>
16
        <option value="WA">Washington</option>
17
    </optgroup>
18
    </select>
19
    <br/>
20
</p>
21
<p>The dropdown below matches on custom attributes of the 
22
    <code>option