zoukankan      html  css  js  c++  java
  • 上下移动-欢迎拍砖

    <!DOCTYPE HTML>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="js/jquery-1.12.1.js"></script> 
    <title>上移下移</title>
    <style>
    ul , h2 { padding:0; margin:0; }
    li { list-style:none; }
    #list{ margin-bottom: 10px; }
    </style>
    <script type="text/javascript">
     // 上移
     $(function(){
     $('input#up').click(function(){
       $(this).parents('#list').prev().before($(this).parents('#list')); 
     })
    // 下移
     $('input#down').click(function(){
       $(this).parents('#list').next().after($(this).parents('#list')); 
     })
    
    })
    </script>
    
    </head>
    
    <body>
    
    <div id="list">1.<input id="up" type="button" name="" value="上移"><input id="down" type="button" name="" value="下移"></div>
    <div id="list">2.<input id="up" type="button" name="" value="上移"><input id="down" type="button" name="" value="下移"></div>
    <div id="list">3.<input id="up" type="button" name="" value="上移"><input id="down" type="button" name="" value="下移"></div>
    <div id="list">4.<input id="up" type="button" name="" value="上移"><input id="down" type="button" name="" value="下移"></div>
    <div id="list">5.<input id="up" type="button" name="" value="上移"><input id="down" type="button" name="" value="下移"></div>
    </body>
    </html>
    

      

  • 相关阅读:
    Qt生成随机数
    Qt调用系统DLL,判断网络连接状态
    Qt操作sqlite数据库
    Qt 操作注册表
    vs报错:RC1004 unexpected end of file found
    Qt操作ini文件
    Django Admin:自动选择当前用户
    BSTR转QString
    vue-cli4,vue3打包后页面无内容
    Qt 5.12.10 国际化
  • 原文地址:https://www.cnblogs.com/zhangli1021/p/7098952.html
Copyright © 2011-2022 走看看