zoukankan      html  css  js  c++  java
  • jquary依据td中button的元素属性删除tr行(删选出想删除的行)


    删除没有蓝色button的行。

    <html>

    <tr>
                                    <td>凉山彝族自治州分行</td>
                                    <td>管理网</td>
                                    <td>离行式ATM</td>
                                    <td class="text-center">MSTP</td>
    <td>西昌市西客站航天阳光</td>
                                    <td class="text-center">建设中</td>
                                    <td class="text-center">
    <a title="详情" class="btn medium ui-state-default small" href="http://118.112.186.175:2222/super/index.php?c=my_network&amp;m=detail_page&amp;line_id=912">
    <span class="button-content"><i class="glyph-icon icon-search-plus float-left"></i>详情&nbsp;</span>
                                        </a>
                                        <span class="btn medium ui-state-default">铺设线路中</span>&nbsp;<a class="btn medium bg-yellow" href="http://118.112.186.175:2222/super/index.php?c=my_network&amp;m=revocation_operate&amp;line_id=912"><span class="button-content">终止操作</span></a> 
                                    </td>
                                </tr>

    <tr>
                                    <td>宜宾市分行</td>
                                    <td>管理网</td>
                                    <td>离行式ATM</td>
                                    <td class="text-center">MSTP</td>
    <td>四川省宜宾市南溪区古街</td>
                                    <td class="text-center">建设中</td>
                                    <td class="text-center">
    <a title="详情" class="btn medium ui-state-default small" href="http://localhost/super/index.php?

    c=my_network&amp;m=detail_page&amp;line_id=896">
    <span class="button-content"><i class="glyph-icon icon-search-plus float-left"></i>详情&nbsp;</span>
                                        </a>
                                        <a class="btn medium primary-bg" href="http://localhost/super/index.php?c=my_network&amp;m=line_verify_next&amp;line_id=896"><span class="button-content">网络验证完毕</span></a>&nbsp;<a class="btn medium bg-yellow" href="http://localhost/super/index.php?c=my_network&amp;m=revocation_operate&amp;line_id=896"><span class="button-content">终止操作</span></a> 
                                    </td>
                                </tr>

    jquary

    <script>
    $(document).ready(function(){
    $(".table tr").each(function(){
    if(!$("a",this).hasClass("primary-bg")){
        $(this).hide();
       }
      });
    });
    </script>

  • 相关阅读:
    os.path.split()、os.path.realpath()和os.path.join()
    我终于也有了自己的博客网站
    (Bug修复)C#爬虫,让你不再觉得神秘
    DevExpress弹框、右键菜单、Grid的使用
    Linux 宝塔部署 ASP.NET Core 应用
    C#高级特性(反射)
    WPF 的内部世界(Binding)
    WPF 的内部世界(控件与布局)
    Layui事件监听(表单和数据表格)
    (待更新)tensorboard [Fatal error in launcher: Unable to create process using]
  • 原文地址:https://www.cnblogs.com/liguangsunls/p/7088774.html
Copyright © 2011-2022 走看看