Jquery 筛选(first last eq slices)
来源:互联网 发布:淘宝店铺认证复核在哪 编辑:程序博客网 时间:2024/04/26 20:23
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>过滤筛选</title>
<script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
</head>
<body>
<h1>111111111111</h1>
<h1>222222222222</h1>
<h1>333333333333</h1>
<h1>444444444444</h1>
<h1>555555555555</h1>
</body>
<script type="text/javascript">
//第一个
$("h1").eq(1).css({'color':'red'});
//除了第一个
$("h1").not($('h1').eq(0)).css({'color':'red'});
//第一个
$("h1").first().css({'color':'red'});
//最后一个
$("h1").last().css({'color':'red'});
//从第几个到底几个
$("h1").slice(1,4).css({'color':'red'});
</script>
</html>
<html>
<head>
<meta charset="UTF-8">
<title>过滤筛选</title>
<script src="http://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
</head>
<body>
<h1>111111111111</h1>
<h1>222222222222</h1>
<h1>333333333333</h1>
<h1>444444444444</h1>
<h1>555555555555</h1>
</body>
<script type="text/javascript">
//第一个
$("h1").eq(1).css({'color':'red'});
//除了第一个
$("h1").not($('h1').eq(0)).css({'color':'red'});
//第一个
$("h1").first().css({'color':'red'});
//最后一个
$("h1").last().css({'color':'red'});
//从第几个到底几个
$("h1").slice(1,4).css({'color':'red'});
</script>
</html>
阅读全文
2 0
- Jquery 筛选(first last eq slices)
- jquery笔记:筛选 eq,first,last,filter,is,has, not, children,closest, nextUntil,parents,parentsUntil.....
- Jquery 筛选---last()
- jQuery 遍历 - 过滤---first--last---eq--not--filter方法(二十五)
- jQuery过滤选择器(first,last/:eq()/:contains()/:has()/:hidden/:visible)
- 知识点七:jQuery 遍历 - 过滤first(), last() 和 eq(),filter() 和 not()
- 数据筛选first. and last.
- jQuery——jQuery基础方法first()/last()/not(CSS选择器)/even/odd/eq(index)/gt(index)/lt(index)
- jQuery :first :last选择器
- jquery基本过滤选择器:first :last :not(.myclass) :even :odd :eq(1) :gt(5) :lt(1) :header :animated :focus
- Jquery-基本筛选:first
- eq、lt、gt、first、last、body>div、id、tag
- 【JQuery】:first和:last过滤选择器
- jquery eq
- jQuery 选择器 first-child和first-of-type、 last-child和last-of-type的区别
- :last选择器(jQuery)
- jQuery选择器$("div span:last-chil/$("*") /$("#main > *")/$("tr:even")/$("td:eq(2)")/$("div:has(p)")(十五)
- 为什么eq筛选找不到Object?
- CapsNet日益火爆!Hinton大神横扫AI界的「胶囊网络」如何理解?
- 机器对工作、生产力及全球经济的影响
- Java静态方法中调用内部类
- 物联网时代传感器厂商竞争格局揭秘
- 果蝇大脑研究能够改进计算机相似性搜索算法
- Jquery 筛选(first last eq slices)
- 2017/11/11
- javascript表单注册批量删除单选复选全选
- Drawerlayout
- XRecycleView
- python 类定义和实例化使用
- 表单注册并删除
- RecycleView的多条目
- CSS3中的动画