Home  >  Q&A  >  body text

“parent()方法选择性地接受同一型选择器表达式”,这句话不明白,选择性接受同一型选择器表达式指的是什么

checkcheck2831 days ago958

reply all(2)I'll reply

  • 数据分析师

    数据分析师2017-09-30 23:02:38

    "The parent() method selectively accepts selector expressions of the same type". I don't understand this sentence. What does it mean to selectively accept selector expressions of the same type? - PHP Chinese website Q&A - "The parent() method is selective. I don’t understand this sentence. What does it mean to selectively accept selector expressions of the same type? - PHP Chinese website Q&A

    Take a look and learn.

    reply
    0
  • 迷茫

    迷茫2016-12-20 09:15:17

    有点类似于children()方法,parent()无参数表示允许我们能够在DOM树中搜索到这些元素的父级元素,从有序的向上匹配元素,并根据匹配的元素创建一个新的 jQuery 对象。而parent()有参数表示对这个合集对象进行一定的筛选,找出目标元素,所以允许传一个选择器的表达式,即接受同一型选择器表达式

    reply
    0
  • Cancelreply