• JQ remove()方法实现似收货地址逐一删除的效果


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>内容显示限定字数</title>
    </head>
    <style type="text/css">
        .box{width:100%;background:pink;height:40px;color:green;line-height:40px;margin-bottom:20px;}
        .fc{clear:both;}
        .fl{float:left;padding-left:30px;}
        .fr{float:right;color:red;padding-right:30px;cursor:pointer}
    </style>
    <body>
    <div class="box">
        <div class="fc">
            <div class="fl">我怀念的,是无话不说</div>
            <div class="fr del">删除</div>
        </div>
    </div>
    <div class="box">
        <div class="fc">
            <div class="fl">我怀念的,是无话不说</div>
            <div class="fr del">删除</div>
        </div>
    </div>
    <div class="box">
        <div class="fc">
            <div class="fl">我怀念的,是无话不说</div>
            <div class="fr del">删除</div>
        </div>
    </div><div class="box">
        <div class="fc">
            <div class="fl">我怀念的,是无话不说</div>
            <div class="fr del">删除</div>
        </div>
    </div>
    <div class="box">
        <div class="fc">
            <div class="fl">我怀念的,是无话不说</div>
            <div class="fr del">删除</div>
        </div>
    </div>
    
    </body>
    <script type="text/javascript" src="js/jQuery1.7.js"></script>
    <script>
    $(document).ready(function(){
     $(".del").click(function(){
        $(this).parents(".box").remove();
     })
    
    })
    </script>
    
    </html>
  • 相关阅读:
    shell 实现word count
    jvm 参数调优
    Java注解处理器(转)
    JVM -XX: 参数介绍(转)
    如何在Linux下重命名多个文件
    Kafka学习之broker配置(0.8.1版)(转)
    linux 历史命令用法(转)
    hive-site.xml 参数设置
    Hadoop-2.2.0 + Hbase-0.96.2 + Hive-0.13.1(转)
    正则表达式通过Unicode属性匹配
  • 原文地址:https://www.cnblogs.com/fkcqwq/p/6281933.html
Copyright © 2020-2023  润新知