关于 jquery multiselect 想做个 http://www.helloweba.com/view-blog-62.html 的例子 可是这里是用PHP搞的 而且我在我这里用asp.net 搞了好久 都不尽人意 不知道哪位大虾高过这个 最好可以搞个列子 然后把源码贴出来吧 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script src="http://www.xsborts.com/hbcms/script/jquery/jquery_1.3.1.js" type="text/javascript"></script><title>鏃犳爣棰樻枃妗?/title></head><body><select id="se1" size="20"><option>鍙互閫夋嫨鐨勬按鏋?/option><option>--------------</option><option value="澶ч钑?>棣欒晧</option><option value="澶ц嫻鏋?>鑻规灉</option><option value="澶ф瀛?>姗樺瓙</option><option value="澶х伀榫欐灉">鐏緳鏋?/option></select><input type="button" value=" >> " id="Button1" > <input type="button" value=" >> " id="Button2" > <input type="button" value=" >> " id="Button3" > <input type="button" value=" >> " id="Button4" > <select id="se2" size="20"><option>鍙互閫夋嫨鐨勬按鏋?/option><option>--------------</option></select><script type="text/javascript"> $(function() { $("#Button1").click(function() { $selceted = $("#se1 option:selected"); $selceted.appendTo("#se2"); }) }) $(function() { $("#Button2").click(function() { $selceted = $("#se2 option:selected"); $selceted.appendTo("#se1"); }) }) $(function() { $("#Button3").click(function() { $select = $("#se1 option").attr(); $select.appendTo("#se2") })})$(function() { $("#Button4").click(function() { $select = $("#se2 option").attr(); $select.appendTo("#se1") })})</script><select id="select1" size="20"><option>鍙互閫夋嫨鐨勬按鏋?/option><option>--------------</option><option value="澶ч钑?>棣欒晧</option><option value="澶ц嫻鏋?>鑻规灉</option><option value="澶ф瀛?>姗樺瓙</option><option value="澶х伀榫欐灉">鐏緳鏋?/option></select><input type="button" value=" >> " onclick="add()"><input type="button" value=" << " onclick="del()"><select id="select2" size="20"><option>鍙互閫夋嫨鐨勬按鏋?/option><option>--------------</option></select><script language="javascript">function add(){var select1 = document.getElementById("select1");var select2 = document.getElementById("select2");var select_index = select1.selectedIndex;if(select_index > 1){var option = document.createElement("option");//绗竴绉?// option.value = select1.options[select_index].value;// option.innerHTML = select1.options[select_index].innerHTML;// select2.appendChild(option);select2.options.add(new Option(select1.options[select_index].innerHTML, select1.options[select_index].value));//绗簩绉?select1.options[select_index] = null;}}function del(){var select1 = document.getElementById("select1");var select2 = document.getElementById("select2");var select_index = select2.selectedIndex;if(select_index > 1){var option = document.createElement("option");//绗竴绉?// option.value = select2.options[select_index].value;// option.innerHTML = select2.options[select_index].innerHTML;// select1.appendChild(option);select1.options.add(new Option(select2.options[select_index].innerHTML, select2.options[select_index].value));//绗簩绉?select2.options[select_index] = null;}}</script></body></html>参考 一般处理程序ashx 返回值的问题,木有? 怎么办??? 站点突然访问不了 dropdownList控件问题 sql 语句的问题 在.net中 ,图片播放器 在Microsoft Visual Studio .NET 2003中新建ASP.NET Web应用程序后,为什么预览的时候报错? .net的移动程序 能在什么样的手机上运行? 水晶报表图表功能怎么实现标尺动态设置 哪里可以下载到利用asp.net制作的聊天室的源代码? datalist 怎么嵌套textbox? 高手帮帮忙!当前提供程序不支持从单一执行返回多个记录集。 通过jquery 给radiobuttonlist 赋值
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://www.xsborts.com/hbcms/script/jquery/jquery_1.3.1.js" type="text/javascript"></script>
<title>鏃犳爣棰樻枃妗?/title>
</head><body>
<select id="se1" size="20">
<option>鍙互閫夋嫨鐨勬按鏋?/option>
<option>--------------</option>
<option value="澶ч钑?>棣欒晧</option>
<option value="澶ц嫻鏋?>鑻规灉</option>
<option value="澶ф瀛?>姗樺瓙</option>
<option value="澶х伀榫欐灉">鐏緳鏋?/option>
</select><input type="button" value=" >> " id="Button1" >
<input type="button" value=" >> " id="Button2" >
<input type="button" value=" >> " id="Button3" >
<input type="button" value=" >> " id="Button4" >
<select id="se2" size="20">
<option>鍙互閫夋嫨鐨勬按鏋?/option>
<option>--------------</option>
</select><script type="text/javascript">
$(function() {
$("#Button1").click(function() {
$selceted = $("#se1 option:selected");
$selceted.appendTo("#se2"); }) })
$(function() {
$("#Button2").click(function() {
$selceted = $("#se2 option:selected");
$selceted.appendTo("#se1"); }) })
$(function() {
$("#Button3").click(function() {
$select = $("#se1 option").attr();
$select.appendTo("#se2")
})
})
$(function() {
$("#Button4").click(function() {
$select = $("#se2 option").attr();
$select.appendTo("#se1")
})
})</script>
<select id="select1" size="20">
<option>鍙互閫夋嫨鐨勬按鏋?/option>
<option>--------------</option>
<option value="澶ч钑?>棣欒晧</option>
<option value="澶ц嫻鏋?>鑻规灉</option>
<option value="澶ф瀛?>姗樺瓙</option>
<option value="澶х伀榫欐灉">鐏緳鏋?/option>
</select><input type="button" value=" >> " onclick="add()">
<input type="button" value=" << " onclick="del()"><select id="select2" size="20">
<option>鍙互閫夋嫨鐨勬按鏋?/option>
<option>--------------</option>
</select><script language="javascript">
function add(){
var select1 = document.getElementById("select1");
var select2 = document.getElementById("select2");
var select_index = select1.selectedIndex;if(select_index > 1){
var option = document.createElement("option");//绗竴绉?
// option.value = select1.options[select_index].value;
// option.innerHTML = select1.options[select_index].innerHTML;
// select2.appendChild(option);select2.options.add(new Option(select1.options[select_index].innerHTML, select1.options[select_index].value));//绗簩绉?select1.options[select_index] = null;
}
}function del(){
var select1 = document.getElementById("select1");
var select2 = document.getElementById("select2");
var select_index = select2.selectedIndex;if(select_index > 1){
var option = document.createElement("option");//绗竴绉?
// option.value = select2.options[select_index].value;
// option.innerHTML = select2.options[select_index].innerHTML;
// select1.appendChild(option);select1.options.add(new Option(select2.options[select_index].innerHTML, select2.options[select_index].value));//绗簩绉?select2.options[select_index] = null;
}
}
</script>
</body>
</html>参考