for循环
while循环
do-while循环
for-in循环
for (initialization; condition; increment)
{
// 执行的代码
}
<script>
for (i=1; i<=5; i++)
{
document.write(i + "<br/>")
}
</script>
while (condition)
{
// 执行的代码
}
<script>
var i=11;
while (i<=15)
{
document.write(i + "<br/>");
i++;
}
</script>
do{
// 执行的代码
}while (condition);
<script>
var i=21;
do{
document.write(i + "<br/>");
i++;
}while (i<=25);
</script>