zoukankan      html  css  js  c++  java
  • jquery过滤器

    <html>
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <script src="http://libs.baidu.com/jquery/1.9.0/jquery.js" type="text/javascript"></script>
        <script>
        $(function () { 
        //$('li').css('background','red');
        //$('li:first').css('background','red');
        //$('li:last').css('background','red');
        //$('li:eq(2)').css('background','red');
        //$('li').filter('.box').css('background','blue');
        //$('li').filter('[title=第二]').css('background','gray'); 
        //$('li:even').css('background','gray');  //序号为偶数的元素 
        //$('li:odd').css('background','gray');  //序号为奇数的元素
        //$('li:lt(3)').css('background','gray'); //序号小于n的元素 
        $('li:gt(3)').css('background','gray');  //序号大于n的元素
        })    
        </script>
    </head>
    <body>
    <ul>
        <li class="box">11</li>
        <li title="第二">11</li>
        <li>11</li>
        <li>11</li>
        <li>11</li>
        <li>11</li>
        <li>11</li>
    </ul>
        
    </body>
    </html>
  • 相关阅读:
    选择排序
    散列冲突解决方案
    string stringbuffer StringBuilder
    java关键字
    Vector
    What is the difference between book depreciation and tax depreciation?
    Type of Asset Books in Oracle Fixed Assets
    questions
    Oracle Express 11g
    iot
  • 原文地址:https://www.cnblogs.com/Xuman0927/p/5610928.html
Copyright © 2011-2022 走看看