实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
AخA
 
1
<!DOCTYPE html>
2
<html>
3
    <head>
4
        <title>
5
            For Statement Example 1
6
        </title>
7
        <script type="text/javascript">
8
            var count = 10;
9
            for (var i = 0; i < count; i++) {
10
                alert(i);
11
            }
12
        /* The preceding is the same as:
13
        
14
        var count = 10;
15
        var i = 0;
16
        while (i < count){
17
            alert(i);
18
            i++;
19
        }
20
        */
21
        </script>
22
    </head>
23
    <body>
24
    </body>
25
</html>