移动、交换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="》》"  onclick="func()"><br><br>
  <input name="button2" type="button" value="《《"  onclick="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>

阅读更多
个人分类: ASP_开发类
上一篇移动、交换SELECT内容
下一篇无限级联动菜单
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭