<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script>
/*while(0){
alert('while')
}
do{
alert(1)
}while(0)
*/
count =1
/*while(count<=10){
alert(count)
count++
}
*/
/*
count =11
do {
alert(count)
++count
}while(count<=10)
*/
//while(1){
//
// if(count>10){
// break;
// }
// alert(count)
// count++
//}
//
//alert('while wai')
for(count =0 ;count<10;count+=3)
{
if(count<8)
{
continue;
}
alert(count)
}
</script>
</body>
</html>
continue break 在循环结构中的使用 for while do while
最新推荐文章于 2022-09-22 20:35:20 发布