如何使用JQuery获取表的tbody元素? [英] How to get the tbody element of a table using JQuery?

查看:62
本文介绍了如何使用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')

>将有直子.

这篇关于如何使用JQuery获取表的tbody元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆