利用jQuery实现Select下拉菜单插件



56 221 74



特效描述:利用jQuery实现 Select 下拉菜单插件,利用jQuery实现Select下拉菜单插件

代码结构

1. 引入CSS

<link href="css/UCFORM.css" rel="stylesheet" type="text/css">

2. 引入JS

<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jQuery.UCSelect.js"></script>

3. HTML代码

<center>
<h1>运行所耗时间</h1>
<div id='runtime'></div>
<br>
<br>
<br>
<h1>1</h1>
<select name="1" tabindex="1" size="20">
</select><br><br>
<button class="on" tabindex="20">加载插件</button>
<button class="off" tabindex="20">销毁插件</button>
<button class="mtp" tabindex="20">设为多选</button>
<button class="set" tabindex="20">单选赋值</button>
<button class="mtpset" tabindex="20">多选赋值</button>
<button class="get" tabindex="20">取值测试</button>
<button class="en" tabindex="20">设为可用</button>
<button class="di" tabindex="20">设为禁用</button>
<button class="op" tabindex="20">展开选项</button>
<button class="cl" tabindex="20">折叠选项</button>
<br>
<br>
<br><br>
<br>
<br>
<br>
<br><br>
<br>
<h1>2</h1>
<select class="select" name="2" tabindex="2" multiple>
	<optgroup label="测试分组" disabled>
	<option value="UC1">1</option>
	<option value="UC2">2</option>
	<option value="UC3">3</option>
	</optgroup>
	<option value="UC4">4</option>
	<option value="UC5">5</option>
	<option value="UC6">6</option>
	<option value="UC7">7</option>
	<option value="UC8">8</option>
	<option value="UC9">9</option>
	<option value="UC10">10</option>
	<optgroup label="测试分组" disabled>
		<option value="UC11">11</option>
		<option value="UC12" selected>12</option>
		<option value="UC13">13</option>
		<option value="UC14">14</option>
		<option value="UC15">15</option>
	</optgroup>
	<option value="UC16">16</option>
	<optgroup label="测试分组2">
		<option value="UC11">11</option>
		<option value="UC12">12</option>
		<option value="UC13">13</option>
		<option value="UC14">14</option>
		<option value="UC15">15</option>
	</optgroup>
	<option value="UC17">17</option>
	<option value="UC18">18</option>
	<option value="UC19">19</option>
	<option value="UC20">20</option>
	<option value="UC21">21</option>
	<option value="UC22">22</option>
	<option value="UC23">23</option>
	<option value="UC24">24</option>
	<option value="UC25">25</option>
	<option value="UC26">26</option>
	<option value="UC27" disabled>27</option>
	<option value="UC28" disabled>28</option>
	<option value="UC29" disabled>29</option>
</select><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<h1>3</h1>
<select name="3" tabindex="3" style="display:none;">
	<option value="UC1">1</option>
	<option value="UC2">2</option>
	<option value="UC3">3</option>
	<option value="UC4">4</option>
	<option value="UC5">5</option>
</select><br>
<br>
<br>
<br>
<br>
<h1>4</h1>
<select name="4" tabindex="4">
	<optgroup label="测试分组" disabled>
	<option value="UC1">1</option>
	<option value="UC2">2</option>
	<option value="UC3">3</option>
	</optgroup>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC1">1</option>
	<option value="UC2" disabled>2</option>
	<optgroup label="测试分组">
	<option value="UC3">3</option>
	<option value="UC4">4</option>
	</optgroup>
	<option value="UC5">5</option>
</select>
</center>
<div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';">
</div>



用户评论
大牛,别默默的看了,快登录帮我点评一下吧!:)      登录 | 注册


热门标签: 滚动导航菜单 滑动导航菜单 浮动导航菜单 导航切换 右键菜单 收缩导航菜单 html5动画导航菜单 flash导航菜单 滚动切换 滑动选项卡切换 选项卡切换 滑动手风琴 切换按钮 form表单 导航菜单导航条 下拉导航菜单 文本框 列表切换

×
×

注册

官方QQ群

扫描上面二维码加微信群

官方QQ群

jQuery/js讨论群
群号:642649996
Css3+Html5讨论群
群号:322131262

加群请备注:从官网了解到