zoukankan      html  css  js  c++  java
  • 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>
  • 相关阅读:
    join
    Hadoop 的 TotalOrderPartitioner
    机器学习开源项目
    java 编程性能调优
    kettel的stream lookup报错
    Mondrian Schema workbench工作界面 简介(实在懒得写,居然有人弄了,收藏了)
    linux软链接和硬链接
    那些超级成功的公司(看着不错,自己收藏)
    Ngnix中的fastcgi參数性能优化和解释
    zip 的 压缩与解压
  • 原文地址:https://www.cnblogs.com/fkcqwq/p/6281933.html
Copyright © 2011-2022 走看看