To make jQuery return the elements from the first , like the XPath sample in Listing 4, you have to instruct it to use the first it finds (see Listing 6).
要让 jQuery 跟 清单 4 中的 XPath 样例一样返回第一个 中的 元素,您必须指导它使用它找到的第一个 (参见 清单 6)。
Selectors: Get a complete list of all the selectors you can use with jQuery, including CSS3 and XPath selectors.
选择器:获取在jQuery中可以使用的选择器的完整列表,包括CSS3和XPath选择器。
Both XPath and jQuery support straightforward traversal semantics for matching element nodes in relation to the currently matched element.
对于匹配与当前匹配的元素相关的元素节点,XPath和jQuery都支持直观的遍历语义。
应用推荐