jQuery first() 方法

jQuery 教程 · 2019-03-28 06:58:25

实例

选取第一个 <div> 元素内的第一个 <p> 元素:

$("div p").first()

定义和用法

first() 方法返回被选元素的第一个元素。

提示:如需返回最后一个元素,请使用 last() 方法。

语法

$(selector).first()

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

查看所有标签

How to Solve It

How to Solve It

Zbigniew Michalewicz、David B. Fogel / Springer / 2004-03-01 / USD 59.95

This book is the only source that provides comprehensive, current, and detailed information on problem solving using modern heuristics. It covers classic methods of optimization, including dynamic pro......一起来看看 《How to Solve It》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具

html转js在线工具
html转js在线工具

html转js在线工具