• <bdo id='7PD4Y'></bdo><ul id='7PD4Y'></ul>

        <tfoot id='7PD4Y'></tfoot>
      1. <legend id='7PD4Y'><style id='7PD4Y'><dir id='7PD4Y'><q id='7PD4Y'></q></dir></style></legend>
      2. <i id='7PD4Y'><tr id='7PD4Y'><dt id='7PD4Y'><q id='7PD4Y'><span id='7PD4Y'><b id='7PD4Y'><form id='7PD4Y'><ins id='7PD4Y'></ins><ul id='7PD4Y'></ul><sub id='7PD4Y'></sub></form><legend id='7PD4Y'></legend><bdo id='7PD4Y'><pre id='7PD4Y'><center id='7PD4Y'></center></pre></bdo></b><th id='7PD4Y'></th></span></q></dt></tr></i><div id='7PD4Y'><tfoot id='7PD4Y'></tfoot><dl id='7PD4Y'><fieldset id='7PD4Y'></fieldset></dl></div>

        <small id='7PD4Y'></small><noframes id='7PD4Y'>

        如何在 jQuery.each() util 中跳到下一次迭代?

        时间:2024-04-18

              <small id='T3OnX'></small><noframes id='T3OnX'>

              <legend id='T3OnX'><style id='T3OnX'><dir id='T3OnX'><q id='T3OnX'></q></dir></style></legend>
            • <tfoot id='T3OnX'></tfoot>

                <bdo id='T3OnX'></bdo><ul id='T3OnX'></ul>
                  <tbody id='T3OnX'></tbody>
                  <i id='T3OnX'><tr id='T3OnX'><dt id='T3OnX'><q id='T3OnX'><span id='T3OnX'><b id='T3OnX'><form id='T3OnX'><ins id='T3OnX'></ins><ul id='T3OnX'></ul><sub id='T3OnX'></sub></form><legend id='T3OnX'></legend><bdo id='T3OnX'><pre id='T3OnX'><center id='T3OnX'></center></pre></bdo></b><th id='T3OnX'></th></span></q></dt></tr></i><div id='T3OnX'><tfoot id='T3OnX'></tfoot><dl id='T3OnX'><fieldset id='T3OnX'></fieldset></dl></div>

                1. 本文介绍了如何在 jQuery.each() util 中跳到下一次迭代?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试遍历一个元素数组.jQuery 的文档说:

                  I'm trying to iterate through an array of elements. jQuery's documentation says:

                  jquery.Each() 文档

                  返回非false与for循环中的continue语句相同,会立即跳到下一次迭代.

                  Returning non-false is the same as a continue statement in a for loop, it will skip immediately to the next iteration.

                  我试过调用'return non-false;'和非假";(无返回)两者都不会跳到下一次迭代.相反,他们打破了循环.我错过了什么?

                  I've tried calling 'return non-false;' and 'non-false;' (sans return) neither of which skip to the next iteration. Instead, they break the loop. What am i missing?

                  推荐答案

                  他们所说的non-false是指:

                  What they mean by non-false is:

                  return true;
                  

                  所以这段代码:

                  var arr = ["one", "two", "three", "four", "five"];
                  $.each(arr, function(i) {
                    if (arr[i] == 'three') {
                      return true;
                    }
                    console.log(arr[i]);
                  });

                  <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

                  将记录.

                  这篇关于如何在 jQuery.each() util 中跳到下一次迭代?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:如何在javascript(jQuery)中分配迭代数组的事件回调 下一篇:在 JavaScript 中将数组作为一对(当前,下一个)迭代

                  相关文章

                  1. <legend id='1KLOk'><style id='1KLOk'><dir id='1KLOk'><q id='1KLOk'></q></dir></style></legend>
                  2. <i id='1KLOk'><tr id='1KLOk'><dt id='1KLOk'><q id='1KLOk'><span id='1KLOk'><b id='1KLOk'><form id='1KLOk'><ins id='1KLOk'></ins><ul id='1KLOk'></ul><sub id='1KLOk'></sub></form><legend id='1KLOk'></legend><bdo id='1KLOk'><pre id='1KLOk'><center id='1KLOk'></center></pre></bdo></b><th id='1KLOk'></th></span></q></dt></tr></i><div id='1KLOk'><tfoot id='1KLOk'></tfoot><dl id='1KLOk'><fieldset id='1KLOk'></fieldset></dl></div>

                    <small id='1KLOk'></small><noframes id='1KLOk'>

                    • <bdo id='1KLOk'></bdo><ul id='1KLOk'></ul>

                    1. <tfoot id='1KLOk'></tfoot>