zoukankan      html  css  js  c++  java
  • js操作ListBox列表(select)内移动

    <script>
    function listBoxClick(obj, addName) {
        var $objSelected = $(obj).find("option:selected");
        if ($objSelected && $objSelected.length > 0) {
                    $objSelected.appendTo($("#" + addName));
        }
    }
    function listBoxSetAll(delName, addName) {
        $("#" + delName).children().appendTo($("#" + addName));
    }
    
    </script>
    
    <select size="4" name="listBox_Station" multiple="multiple" id="listBox_Station" onDblClick="listBoxClick(this,'listBox_SelectStation');" style="300px;height:327px;padding-left: 3px;margin-left:8px;">
    </select>
    
     <span style="display: inline-block;height: 402px;vertical-align: middle; 40px;text-align: center;">
                    <input type="button" value=" >> " onclick="listBoxSetAll('listBox_Station', 'listBox_SelectStation');" style="font-size:15px;" />
                    <br /><br />
                    <input type="button" value=" << " onclick="listBoxSetAll('listBox_SelectStation', 'listBox_Station');" style="font-size:15px;" />
    </span>
                
    <select size="4" name="listBox_SelectStation" multiple="multiple" id="listBox_SelectStation" onDblClick="listBoxClick(this,'listBox_Station');" style="300px;height:327px;padding-left: 3px;">
    </select> 
  • 相关阅读:
    spring websocket 记录
    mysql-enum
    再问jvm内存管理
    video相关参数、操作和事件
    监听页面关闭和刷新的总结
    VUE路由新页面打开的方法总结
    VUE的一个数据绑定与页面刷新相关的bug
    element-ui笔记
    Vue笔记(props和 mounted)
    Python总结(二)
  • 原文地址:https://www.cnblogs.com/elves/p/5898415.html
Copyright © 2011-2022 走看看