zoukankan      html  css  js  c++  java
  • 节点移动

    <!DOCTYPE html>
    <html lang="en">
    
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <title>Document</title>
        <style>
            select {
                 100px;
                height: 150px;
            }
    
            form {
                display: flex;
            }
    
            div {
                 40px;
            }
        </style>
    </head>
    
    <body>
        <form action="#" method="get">
            <select name="" id="name" multiple>
                <option value="zgl">诸葛亮</option>
                <option value="zf">张飞</option>
                <option value="gy">关羽</option>
                <option value="xc">许褚</option>
                <option value="lb">刘备</option>
                <option value="cc">曹操</option>
            </select>
            <div>
                <input type="button" value="&gt;">
                <input type="button" value="&gt;&gt;">
                <input type="button" value="&lt;">
                <input type="button" value="&lt;&lt;">
            </div>
            <select name="" id="changeName" multiple>
    
            </select>
            <div>
                <input type="button" value="↑">
                <input type="button" value="↓">
            </div>
        </form>
        <script src="./jquery-1.12.4.min.js"></script>
        <script>
            window.onload = function name(params) {
            //向右移动选中的项 $(
    "input[value='>']").click(function () { $("select option:selected").appendTo("#changeName"); })
            //向右移动所有项 $(
    "input[value='>>']").click(function () { $("select option").appendTo("#changeName"); })
        
           //向左移动选中的项
                $("input[value='<']").click(function () {
                    $("#changeName>option:selected").appendTo("#name");
                })
             //向左移动所有项 $(
    "input[value='<<']").click(function () { $("#changeName option").appendTo("#name"); })
            //上移 $(
    "input[value = '↑']").click(function () { $("#changeName option:selected:first").prev().before($("#changeName option:selected")) $("#name option:selected:first").prev().before($("#name option:selected")) })
            //下移 $(
    "input[value = '↓']").click(function () { $("#name option:selected:last").next().after($("#name option:selected")) $("#changeName option:selected:last").next().after($("#changeName option:selected")) }) } </script> </body> </html>
  • 相关阅读:
    SharePoint文件磁盘存储组件使用指南
    自定义SharePoint新网站创建过程(1)
    SharePoint : 超级Web Application Framework
    Video:使用VSeWSS创建定制SharePoint页面
    SharePoint Designer 2007 is now FREE !
    关于SharePoint解决方案开发模型的凌乱文章…
    初试Silverlight Streaming服务
    Feature Schema中Module和File节点属性含义的解释
    如何定制列表项编辑页面
    使用SharePoint Server 2007搜索Domino Notes
  • 原文地址:https://www.cnblogs.com/cj-18/p/9206871.html
Copyright © 2011-2022 走看看