jQuery slice() 方法
jQuery 教程
· 2019-03-28 12:18:27
实例
从带有索引号为 2 的 <p> 元素开始选中 <p> 元素:
$("p").slice(2)
定义和用法
slice() 方法选取基于索引的元素的子集。
子集是一个属于大的集合中的一部分的集合。
该方法用于通过开始点和结束点来限制组合中元素的选择:start 参数是创建子集的开始索引(从 0 开始),stop 参数是一个可选的结束点。
语法
$(selector).slice(start,stop)
参数 | 描述 |
---|---|
start | 必需。规定开始选取元素的位置。索引号从 0 开始。 注意:如果是负数,则指示从被选元素的末端开始选取元素,而不是从头开始。 |
stop | 可选。规定结束选取元素的位置。如果省略,则选取范围会在集合末端结束。索引号从 0 开始。 注意:如果是负数,则指示从被选元素的末端开始选取元素,而不是从头开始。 |
点击查看所有 jQuery 教程 文章: https://www.codercto.com/courses/l/35.html
APIs
Daniel Jacobson、Greg Brail、Dan Woods / O'Reilly Media / 2011-12-24 / USD 24.99
Many of the highest traffic sites get more than half of their traffic not through the browser but through the APIs they have created. Salesforce.com (more than 50%) and Twitter (more than 75% fall int......一起来看看 《APIs》 这本书的介绍吧!
图片转BASE64编码
在线图片转Base64编码工具
正则表达式在线测试
正则表达式在线测试