<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## index() 概述:它是JQ函數庫提供一個常用方法,它可用獲取到某一個匹配節點的索引值。 ## 語法: ``` console.log($(".cur").index()) ; ``` ## each() 概述:它也是jquery函數庫給我們提供方法,主要是把所有匹配的節點遍歷 ## 語法:其中index是回調函數行參中的索引,element是元素。。。(這是each()方法里默認的2個行參值。) (在HTML中標簽就是元素的意思 比如P DIV 也可也叫做元素(英文(element)) <br/> ~~~ $("li").each(function(index,element){ $(element).css({"color":"red"}); }) ~~~ 代碼如下:(把所有li標簽里的字體顏色都變成紅色) ~~~ <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="./jquery/jquery-3.2.1.min.js"></script> </head> <body> <ul> <li>吃飯</li> <li>睡覺</li> <li class="cur">打豆豆</li> <li>喝酒</li> <li>燙頭</li> </ul> </body> </html> <script type="text/javascript"> console.log($(".cur").index()) ; $("li").each(function(index,element){ $(element).css({"color":"red","width":"20px","height":"50px"}); }) </script> ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看