jQuery :first 选择器

jQuery 教程 · 2019-03-10 06:44:21

实例

选取第一个 <p> 元素:

$("p:first")

定义和用法

:first 选择器选取第一个元素。

注意:这个选择器只用于选取单个元素。使用 :first-child 选择器选取多个元素(每个父元素一个)。

最常见的用法:与其他选择器一起使用,选取指定组合中的第一个元素(就像上面的实例)。

提示:如需选取指定组合中的最后一个元素,请使用 :last 选择器。

语法

$(":first")

点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html

查看所有标签

Natural Language Processing with Python

Natural Language Processing with Python

Steven Bird、Ewan Klein、Edward Loper / O'Reilly Media / 2009-7-10 / USD 44.99

This book offers a highly accessible introduction to Natural Language Processing, the field that underpins a variety of language technologies, ranging from predictive text and email filtering to autom......一起来看看 《Natural Language Processing with Python》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具