【问题标题】:How to find the first ancestor node whose tag is <tbody> with jQuery?如何使用jQuery找到标签为<tbody>的第一个祖先节点?
【发布时间】:2009-09-24 04:38:05
【问题描述】:

假设jQuery对象是$obj,如何选择想要的祖先?

【问题讨论】:

    标签: jquery css-selectors ancestor


    【解决方案1】:

    parents():first 选择器一起使用:

    obj.parents("tbody:first");
    

    【讨论】:

    • 我不知道 .parents() 调用在哪里!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-02-06
    • 1970-01-01
    • 2019-06-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多