jQuery :eq() 选择器

jQuery 教程 · 2019-03-10 11:14:03

实例

选取第二个 <p> 元素:

$("p:eq(1)")

定义和用法

:eq() 选择器选取带有指定 index 值的元素。

index 值从 0 开始,所以第一个元素的 index 值是 0(不是 1)。

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

语法

$(":eq(index)")

参数 描述
index 必需。规定元素的索引。

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

查看所有标签

Ruby for Rails

Ruby for Rails

David Black / Manning Publications / 2006-05-11 / USD 44.95

What's Inside * How Ruby and Rails work, separately and together * Extensive Ruby language tutorial * Ruby techniques for Rails applications * Explore the Rails framework source code A new level of pr......一起来看看 《Ruby for Rails》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具