代码展示:
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
<script>
for(var i=0;i<5;i++)
{
if(i==2)
{
//break; //整个循环中断了
continue; //本次循环中断了
}
alert(i);
}
</script>
</head>
<body>
</body>
</html>