W3School TIY
编辑您的代码:
<html> <body> <script type="text/javascript"> var i=0 for (i=0;i<=10;i++) { if (i==3){continue} document.write("数字是 " + i) document.write("<br />") } </script> <p>解释:当 i=3 时,会中断循环,并从下一个值开始继续循环。</p> </body> </html>
查看结果: