码迷,mamicode.com
首页 > Web开发 > 详细

[ jquery 选择器 :odd ] 此方法选取指定jquery对象中的奇数对象

时间:2016-06-22 06:52:50      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:

<!DOCTYPE html>
<html lang=‘zh-cn‘>
<head>
<title>Insert you title</title>
<meta http-equiv=‘description‘ content=‘this is my page‘>
<meta http-equiv=‘keywords‘ content=‘keyword1,keyword2,keyword3‘>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- <script type=‘text/javascript‘ src=‘./js/jquery-3.0.0.js‘></script> -->
<script type=‘text/javascript‘ src=‘./js/jquery-1.12.1.min.js‘></script>
<style type=‘text/css‘>
   li{width:100%;height:20px;margin:10px 0;background:GreenYellow;font:400 13px/20px ‘Courier New‘;color:#000;text-align:center;}
</style>
<script type=‘text/javascript‘>
    $(function(){
           $(‘#list li:odd‘).html(‘:odd : 伪类选择器演示‘);
    });
</script>
</head>
<body>
   <ul id=‘list‘>
       <li></li>
       <li class=‘active‘></li>
       <li></li>
       <li></li>
   </ul>
</body>
</html>

 

[ jquery 选择器 :odd ] 此方法选取指定jquery对象中的奇数对象

标签:

原文地址:http://www.cnblogs.com/mysearchblog/p/5605582.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!