假设我有以下的HTMLJavaScript的浏览子元素
<div class="mytable">
<table>
<tbody>
<tr>
</tr>
</tbody>
<table>
</div>
<div class="mytable">
<table>
<tbody>
<tr>
</tr>
</tbody>
<table>
</div>
我用下面的代码地址:
$('.mytable').each(function(){
var that = $(this);
});
现在我需要得到TR元素在我的桌子里面。我怎样才能做到这一点?我想是这样的:。
$(that+'>tr')
,但它显然没有奏效((任何帮助,将不胜感激谢谢
尝试'that.find('tr')' –
我建议你阅读[这个JQuery教程](https://learn.jquery.com/using-jquery-core/selecting-elements/),它解释了概念涉及 – Aaron
以及里面的ID和类怎么样?是否有可能使用像$(that.find('#myid'))? – Jack