<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jquery Pratice</title>
</head>
<body>
<script type="text/javascript" src="jquery-1.5.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#Ladd").click(function(){
$("#select1 option:selected").appendTo("#select2");
});
$("#Radd").click(function(){
$("#select2 option:selected").appendTo("#select1");
});
$("#Lall").click(function(){
$("#select1 option").appendTo("#select2");
});
$("#Rall").click(function(){
$("#select2 option").appendTo("#select1");
});
$("#select1").dblclick(function(){
$("#select1 option:selected").appendTo("#select2");
});
$("#select2").dblclick(function(){
$("#select2 option:selected").appendTo("#select1");
});
});
</script>
<div id="div1">
<div id="content1">
<select id="select1" multiple="multiple">
<option value="1">chj01</option>
<option value="2">chj02</option>
<option value="3">chj03</option>
<option value="4">chj04</option>
<option value="5">chj05</option>
</select>
</div>
<div id="anniu1">
<button id="Ladd">选中>></button>
<button id="Lall">全部>></button>
</div>
</div>
<div id="div2">
<div id="content2">
<select id="select2" multiple="multiple">
<option value="1">chj010</option>
<option value="2">chj020</option>
<option value="3">chj030</option>
<option value="4">chj040</option>
<option value="5">chj050</option>
</select>
</div>
<div id="anniu2">
<button id="Radd"><<选中</button>
<button id="RAll"><<全部</button>
</div>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Jquery Pratice</title>
</head>
<body>
<script type="text/javascript" src="jquery-1.5.1.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#Ladd").click(function(){
$("#select1 option:selected").appendTo("#select2");
});
$("#Radd").click(function(){
$("#select2 option:selected").appendTo("#select1");
});
$("#Lall").click(function(){
$("#select1 option").appendTo("#select2");
});
$("#Rall").click(function(){
$("#select2 option").appendTo("#select1");
});
$("#select1").dblclick(function(){
$("#select1 option:selected").appendTo("#select2");
});
$("#select2").dblclick(function(){
$("#select2 option:selected").appendTo("#select1");
});
});
</script>
<div id="div1">
<div id="content1">
<select id="select1" multiple="multiple">
<option value="1">chj01</option>
<option value="2">chj02</option>
<option value="3">chj03</option>
<option value="4">chj04</option>
<option value="5">chj05</option>
</select>
</div>
<div id="anniu1">
<button id="Ladd">选中>></button>
<button id="Lall">全部>></button>
</div>
</div>
<div id="div2">
<div id="content2">
<select id="select2" multiple="multiple">
<option value="1">chj010</option>
<option value="2">chj020</option>
<option value="3">chj030</option>
<option value="4">chj040</option>
<option value="5">chj050</option>
</select>
</div>
<div id="anniu2">
<button id="Radd"><<选中</button>
<button id="RAll"><<全部</button>
</div>
</div>
</body>
</html>