[ jquery 選擇器 :odd ] 此方法選取指定jquery對象中的奇數對象


<!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>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM