JavaScript continue【每日一段代码60】

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

posted on 2012-03-25 18:30  Cosimo  阅读(153)  评论(0编辑  收藏  举报

导航