jquary根据td中按钮的元素属性删除tr行(删选出想删除的行)


删除没有蓝色按钮的行。

<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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值