zoukankan      html  css  js  c++  java
  • java script两个列表之间移动数据

    <select name="b1" id="hao" style="100px; height:200px;" size="8">
            <option>左1  </option>
            <option>  左2</option>
            <option >  左3</option>
        </select>
        <input  type="button" name="xiangzuo" id="zuo" value="》" onclick="zuo()" size="8"/>
        <input  type="button" name="xiangyou" id="you" value="《"/ onclick="you()" size="8"/>
        <select name="b2" id="buhao" style="100px; height:200px;" size="8">
            <option >右1  </option>
            <option >  右2</option>
            <option>  右3</option>
        </select>
        <script>
            function zuo()
            {
                var op=document.getElementById("hao").selectedOptions;
                
                document.getElementById("buhao").appendChild(op[0]);
                document.getElementById("hao").removeChild(op[0]);
                
            }
        function you(){
            var op=document.getElementById("buhao").selectedOptions;
            document.getElementById("hao").appendChild(op[0]);
            document.getElementById("buhao").removeChild(op[0]);
            }
        </script>

  • 相关阅读:
    删除 SQL Server 2005 Express 工具
    静态和非静态
    C#中的托管和非托管
    类和结构的区别
    asp.net URL DES加密 什在URL中的使用
    正则替换图片路径
    Oracle 正则 一行转多行
    Oracle 存储过程
    HTTP SOAP Request
    jquery 高亮
  • 原文地址:https://www.cnblogs.com/yi11/p/6611092.html
Copyright © 2011-2022 走看看