第二十二节 JavaScript中的for循环
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Document</title> 6 <script type="text/javascript"> 7 8 var aList = ['a','b','c','d','e','f']; 9 for(var i=0; i<aList.length;i++){ 10 alert(aList[i]); 11 } 12 </script> 13 </head> 14 <body> 15 16 </body> 17 </html>