移动、交换SELECT内容2


<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
function func(){
var obj = document.form1.select1;
if(document.form1.select2.options.length>0){
document.form1.select2.options.length = 0;
}
for(i=0;i<obj.options.length;i++){
if(obj.options[i].selected){
  tmp = obj.options[i]
  document.form1.select2.add(new Option(tmp.text,tmp.value));
}
}
}
function remove(){
var obj = document.form1.select2;
for(i=0;i<obj.options.length;i++){
if(obj.options[i].selected){
  obj.options[i].removeNode();
}
}

}
</script>

</head>
<body>
<form name="form1">
<table width="67%" border="0" align="center">
  <tr>
      <td width="29%">
   <select name="select1" size="20" multiple style="width:200">
          <option value="xxxxxx">A_table</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.a</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.b</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">A_table</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.a</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.b</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">A_table</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.a</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.b</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">A_table</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.a</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.b</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">A_table</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.a</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.b</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx">&nbsp;&nbsp;A_table.c</option>
          <option value="xxxxxx11">&nbsp;&nbsp;A_table.c</option>
       </select></td>
    <td width="11%">
  <input name="button1" type="button" value="》》"  οnclick="func()"><br><br>
  <input name="button2" type="button" value="《《"  οnclick="remove()"><br><br>
 </td>
      <td width="60%">
   <select name="select2" size="20" multiple style="width:200">
     </select></td>
  </tr>
</table>
  <div align="center">
    <input name="butNext" type="button" value="上一步">
    &nbsp;&nbsp;
    <input name="butBfore" type="button"  value="下一步">
  </div>
</form>
</body>
</html>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值