<head runat="server">
<title>無標題頁</title>
<script type="text/javascript" src="js/jquery
<script type="text/javascript">
$(document)
// 把選擇項追加給對方
$(
var options=$(
var remove=options
remove
});
// 把所有項追加給對方
$(
var options=$(
var remove=options
remove
});
// 把選擇項退回給對方
$(
var options=$(
var remove=options
remove
});
// 把全部項退回給對方
$(
var options=$(
var remove=options
remove
});
});
</script>
</head>
<body>
<form id="form
<div id="left">
<select multiple="multiple" id="select
<option>選項
<option>選項
<option>選項
<option>選項
<option>選項
</select>
</div>
<div>
<span id="add">選中項添加至右邊>></span><br />
<span id="addAll">全部添加到右邊>></span>
</div>
<div id="right">
<select multiple="multiple" id="select
</div>
<div>
<span id="remove"><<選中項還原至左邊</span><br />
<span id="removeAll"><<全部還原至左邊</span>
</div>
</form>
</body>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/19909.html