如何使用JQuery获取表的tbody元素?
问题描述:
我有一个带有thead和tbody的表结构(Table1).
I have a table structure (Table1) with thead and tbody.
我的主剧院也有一个桌子,里面有自己的剧院和tbody.
My main thead also has a table inside with its own thead and tbody.
当我使用$('#Table1 tbody')
时,它返回所有tbody元素,而我只需要Table1的tbody.
When I use $('#Table1 tbody')
it returns all tbody elements whereas I'd only need the tbody of the Table1.
这怎么实现?
谢谢
答
$('#Table1 > tbody')
>
将有直子.