zoukankan      html  css  js  c++  java
  • 权限选择

    <!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" />
    <title>无标题文档</title>
    <script src="jquery-1.4.2.min.js"></script>
    <script language="javascript" type="text/javascript">
     function MoveSelect(selectSrc,selectDest){
       for(var i=selectSrc.childNodes.length-1;i>=0;i--){
        var option = selectSrc.childNodes[i];
         if(option.selected==true){
           selectSrc.removeChild(option);
           option.selected = false;
           selectDest.appendChild(option);
          }
        }
      }
     function MoveAllSelect(selectSrc,selectDest){
       for(var i=selectSrc.childNodes.length-1;i>=0;i--){
         var option = selectSrc.childNodes[i];
         selectSrc.removeChild(option);
         selectDest.appendChild(option);
        }  
      }
    </script>
    </head>

    <body>
    <select id="select1" multiple="multiple" style="60px">
    <option>选择</option>
    <option>添加</option>
    <option>修改</option>
    <option>查询</option>
    <option>打印</option>
    </select>
    <input type="button" value=">" onclick="MoveSelect(document.getElementById('select1'),document.getElementById('select2'))"/>
    <input type="button" value="<" onclick="MoveSelect(document.getElementById('select2'),document.getElementById('select1'))" />
    <input type="button" value=">>" onclick="MoveAllSelect(document.getElementById('select1'),document.getElementById('select2'))"/>
    <input type="button" value="<<" onclick="MoveAllSelect(document.getElementById('select2'),document.getElementById('select1'))"/>
    <select id="select2" multiple="multiple" style="60px">
    </select>
    </body>
    </html>

  • 相关阅读:
    git上传本地代码
    oracle 时间格式转化以及计算
    windows 下使用sqlplus
    filter 过滤器加载流程
    vscode java
    vscode cpp
    manual jar
    toy jar
    inteli shortcut
    eng
  • 原文地址:https://www.cnblogs.com/caishuowen/p/2011294.html
Copyright © 2011-2022 走看看