weixin_33713707 2012-11-06 11:15 采纳率: 0%
浏览 114

删除表中所有相同的id tr

<table>
<tr id="Name"></tr>
<tr id="Name"></tr>
<tr id="Name"></tr>
<tr id="Name"></tr>
<tr id="Name"></tr>
<tr id="address"></tr>
</table>

This is my problem. I want to remove all tr whose id is Name without using any loop.

Here is my code

jQuery('#Name').remove();
  • 写回答

4条回答 默认 最新

  • weixin_33695082 2012-11-06 11:16
    关注

    Yopu better use some class instead of id as id is supposed to be unique for the elements in dom.

    Live Demo

    $('.someclass').remove();
    
    评论

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!