标签:代码 pre switch blog write 数字 var span bsp
var i = 0for(i = 0; i <= 10; i++) { if (i == 3) { break } document.write("The number is " + i) document.write("<br />") } </script> </body> </html> 结果 The number is 0
The number is 1
The number is 2
--
var i = 0for(i = 0; i <= 10; i++) { if (i == 3) { continue } document.write("The number is " + i) document.write("<br />") } </script> </body> </html> 结果: The number is 0
The number is 1
The number is 2
The number is 4
The number is 5
The number is 6
The number is 7
The number is 8
The number is 9
The number is 10
标签:代码 pre switch blog write 数字 var span bsp
原文地址:http://www.cnblogs.com/Ph-one/p/6601749.html