当前位置:网站首页>How JQ gets the reciprocal elements
How JQ gets the reciprocal elements
2022-06-27 05:03:00 【Front cut zz】
<ul>
<li> Penultimate </li>
<li> The third from the bottom </li>
<li> second to last </li>
<li> The last one </li>
</ul>
jq Get last element :
var text = $('ul li').last().text()
console.log(text)
Print the results :
jq Get the penultimate element :
var text = $('ul li').eq(-2).text()
console.log(text)
Print the results :
expand :
eq() Method : Returns the element with the specified index number of the selected element .
grammar
$(selector).eq(index)
index There has to be , Index used to specify elements . It can be an integer or a negative number . among , Using a negative number will calculate the index from the end of the selected element .
边栏推荐
- STM32 reads IO high and low level status
- 014 C language foundation: C string
- 021 basics of C language: recursion, variable parameters
- math_ Number set (number set symbol) and set theory
- 躲避小行星游戏
- 013 C语言基础:C指针
- MySql最详细的下载教程
- Vue学习笔记(五)Vue2页面跳转问题 | vue-router路由概念、分类与使用 | 编程式路由导航 | 路由组件的缓存 | 5种路由导航守卫 | 嵌套路由 | Vue2项目的打包与部署
- 微服务系统设计——分布式缓存服务设计
- Microservice system design -- API gateway service design
猜你喜欢
Système de collecte des journaux
认知篇----2022高考志愿该如何填报
Microservice system design - service fusing and degradation design
Microservice system design -- microservice monitoring and system resource monitoring design
2022-06-26: what does the following golang code output? A:true; B:false; C: Compilation error. package main import “fmt“ func main() { type
微服务系统设计——服务熔断和降级设计
[array]bm94 rainwater connection problem - difficult
How to systematically learn LabVIEW?
Matlab | drawing of three ordinate diagram based on block diagram layout
Cultural tourism light show breaks the time and space constraints and shows the charm of night tour in the scenic spot
随机推荐
021 basics of C language: recursion, variable parameters
MySql最详细的下载教程
016 C语言基础:C语言枚举类型
Microservice system design -- distributed transaction service design
three.js第一人称 相机前枪的跟随
013 basics of C language: C pointer
Interview: what are the positioning methods in selenium? Which one do you use most?
AD22 gerber files 点开 gerber steup 界面 有问题 官方解决方法
微服务系统设计——分布式定时服务设计
Pytest框架的执行规则
AcWing 第 57 场周赛---BC题挺好
轨道姿态常用编程缩写
1.5 use of CONDA
微服务系统设计——API 网关服务设计
021 C语言基础:递归,可变参数
Cognition - how to fill in 2022 college entrance examination volunteers
牛客练习赛101-C 推理小丑---位运算+思维
RTP 发送PS流工具(已经开源)
007 basics of C language: C operator
《数据库原理与应用》第一版 马春梅……编著 期末复习笔记