例子、方法 、链接介绍,,这功能叫什么名字
------解决方案--------------------------------------------------------
用javascript可以实现
例子
<!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>
<title></title>
<script language="javascript" type="text/javascript">
function moveUser(obj_1_name, obj_2_name) {
var obj_1_container = document.getElementById(obj_1_name);
var obj_2_container = document.getElementById(obj_2_name);
var obj_1_selected = obj_1_container.getElementsByTagName("Option");
for (var i = 0; i < obj_1_selected.length; i++) {
if (obj_1_selected[i].selected) {
obj_2_container.options.add(new Option(obj_1_selected[i].text, obj_1_selected[i].value));
obj_1_container.options.remove(i);
i--;
}
}
}
</script>
</head>
<body>
<select id='unselecteduser' multiple="multiple">
<option value='张三'>张三</option>
<option value='李四'>李四</option>
<option value='王五'>王五</option>
</select>
<input type='button' value='>>' onclick="moveUser('unselecteduser','selecteduser');" />
<input type='button' value='<<' onclick="moveUser('selecteduser','unselecteduser');" />
<select id='selecteduser' multiple="multiple">
</select>
</body>
</html>
如果用jQuery库会更简单些。