W3CAPI 实例工具箱
运行代码
源代码
<!DOCTYPE html> <html lang="en"><br><head> <meta charset="UTF-8"> <title>JavaScript while statement : Example-1</title> </head><body> <body> <h1 style="color: red">JavaScript : while statement</h1> <h3> The while loop calculate the sum of odd numbers between 0 to 10. </h3> <p id="result">List of numbers :</p> <script src="while-statement-example1.js"></script> </body> </html>
运行结果
友情提示
您正在使用的浏览器为IE浏览器,或者使用了IE模式
如果你使用的是IE浏览器,建议您下载
360急速浏览器
/
火狐浏览器
/
Opera浏览器