删除表中所有相同的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();

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

Live Demo

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

Ids are unique, you cannot use same Id twice, however you can use same class 'n' number of times

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

<script>
   jQuery('.Name').remove();
</script>

Don't use the ID attribute, if it is not an identifier! An identifier has to be unique throughout the document or you get errors like you have.

If multiple elements should share some property (like in your case being selectable all together), use other attributes for that like data-, name (sometimes) or class.

In your case you want to use the name or class attribute. In case you decide to use the class attribute, the JS could look like the following:

jQuery('.Name').remove();

With this HTML

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

Use the jQuery attribute selector to find elements:

Don't use id for more than one element in same document.

$("tr[id='Name']").remove()

Demo here: jsfiddle