AspNet技术

.Net平台 + C#语言 + Microsoft SQL Server 开发互联网之web应用!

[原]左右的移动<<>><>jQuery的实现

$(function () {
            $('#toAllLeft').click(function () {
                $('#se1 option').appendTo($('#se2'));
            });

            $('#toAllRight').click(function () {
                $('#se2 option').appendTo($('#se1'));
            });
            $('#toRight').click(function () {
                $('#se1 option:selected').appendTo($('#se2'));
            });
            $('#toLeft').click(function () {
                $('#se2 option:selected').appendTo($('#se1'));
            });
                });

<div style=" margin-left:400px; margin-top:10px;">
    <select multiple="multiple" style="float: left; width: 40px; height: 100px;" id="se1">
        <option>添加</option>
        <option>删除</option>
        <option>修改</option>
        <option>查询</option>
        <option>打印</option>
    </select>
    <div style="width: 50px; float: left; ">
        <input type="button" name="name" value=">" style="width: 50px;" id="toRight" />
        <input type="button" name="name" value="<" style="width: 50px;" id="toLeft" />
        <input type="button" name="name" value=">>" style="width: 50px;" id="toAllLeft" />
        <input type="button" name="name" value="<<" style="width: 50px;" id="toAllRight" />
    </div>
     <select multiple="multiple" style="float: left; width: 40px; height: 100px;" id="se2">
     </select>
    </div>

 

posted on 2014-04-26 22:09  Seves2015  阅读(124)  评论(0编辑  收藏  举报

导航