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>

  • 相关阅读:
    Redis 锁
    Redis 持久化
    Redis 数据淘汰策略
    Redis 事务命令
    【vue禁止复制粘贴】
    tsconfig.json无法写入webpack.config.js 因为它会覆盖输入文件。
    npm 进阶命令知多少(一)
    如何将360度评估调查应用于员工发展?
    如何利用360度评估做好民主评议促进干部管理与选拔?
    手把手带你使用360度评估系统实施绩效反馈全流程(附详细图文)
  • 原文地址:https://www.cnblogs.com/liguangsunls/p/7088774.html
Copyright © 2011-2022 走看看