<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="LRSelect.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$.fn.LRSelect("selLeft", "selRight", "img_L_AllTo_R", "img_L_To_R", "img_R_To_L", "img_R_AllTo_L");
$.fn.UpDownSelOption("imgUp", "imgDown", "selRight");
});
</script>
</head>
<body>
<table cellpadding="0" cellspacing="0" >
<tr>
<td style="vertical-align:bottom;" >
<select id="selLeft" multiple="multiple" style="width:205px;height:330px" class="dataSelect" >
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
</td>
<td style="width:30px;text-align:center;">
<img id="img_L_AllTo_R" alt=">|" src="" />
<img id="img_L_To_R" alt=">" src="" /><br />
<img id="img_R_To_L" alt="<" src="" /><br />
<img id="img_R_AllTo_L" alt="|<" src="" /><br />
</td>
<td style="vertical-align:bottom;" >
<select id="selRight" multiple="multiple" style="width:205px;height:330px" class="dataSelect" >
<option value="5">5</option>
<option value="6">6</option>
</select>
</td>
<td style="width:30px;text-align:center;">
<img id="imgUp" alt="∧" src="" /><br />
<img id="imgDown" alt="∨" src="" />
</td>
</tr>
</table>
</body>
</html>
jQuery插件DIY:设置左右select的option的互相移动
最新推荐文章于 2020-11-21 20:22:32 发布