One thing to note is that the jQuery closest method works more like XPath's ancestor-or-self; it will include the current node if it matches.
有一件事要注意,jQueryclosest方法的行为很像XPath的ancestor - or - self;如果匹配的话,它将包含当前节点。
Like ancestor in XPath, descendant has a descendant-or-self for those special cases where the selected node might match what you're looking for (see Figure 3).
对于那些特殊情况,即选择的节点可能匹配您正在寻找的元素,那么跟XPath中的祖先一样,子孙也具有descendant - or - self(参见图3)。
Like ancestor in XPath, descendant has a descendant-or-self for those special cases where the selected node might match what you're looking for (see Figure 3).
对于那些特殊情况,即选择的节点可能匹配您正在寻找的元素,那么跟XPath中的祖先一样,子孙也具有descendant - or - self(参见图3)。
应用推荐