<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<script>
var count =0;
/*while(count<5){
alert(count)
count++
}
*/
/*count =5
do{
alert(count)
count++
}while(count<5);*/
/*for(count=0;count<5;count+=52){
alert(count)
}
*/
count =0;
while(1)
{
if(count<5){
alert(count)
}else{
alert( 'count不小于5')
break
}
count++
}
</script>
</body>
</html>
while ,for 循环语句
最新推荐文章于 2023-01-30 18:45:09 发布