If it's simply tr[0]
, all the first <tr>
will be targeted, so you should set a value that can be identified by an id or user-defined attribute in the tag and select only that tag to erase it.
For example:
<table id="firstMan">
<tr data-idx="1">
<td id="removeMe"></td>
<td></td>
</tr>
<tr data-idx="2">
<td id="dontShoot"></td>
<td></td>
</tr>
</table>
<table id="secondary">
<tr data-idx="1">
<td></td>
<td></td>
</tr>
<tr data-idx="2">
<td>
<td></td>
</tr>
</table>
You must have an identifier that distinguishes you from other tags in this way to clear only the tags you want.
© 2025 OneMinuteCode. All rights reserved.