如何使用jQuery定位表中的第二个<tr>
?我使用.closest
还是nth-child
?
// something like this..
var MyLocation = $('.myclass').closest('tr').after('tr'); // fixed
<table class ='myclass'>
<tr>
<td></td>
</tr>
<!-- put some thing here -->
<tr>
</tr>
最佳答案
$('.myclass tr').eq(1)
这将抢第二个。