• 权限选择


    <!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>

  • 相关阅读:
    关于content-type请求头的说明
    RabbitMQ
    tornado
    flask总结之session,websocket,上下文管理
    爬虫相关问题总结
    爬虫之scrapy框架
    爬虫之Selenium模块
    爬虫之Beautifulsoup及xpath
    爬虫之requests
    SQLAlchemy
  • 原文地址:https://www.cnblogs.com/caishuowen/p/2011294.html
Copyright © 2020-2023  润新知