W3School TIY
(请在下面的文本框中编辑您的代码,然后单击此按钮测试结果。)
编辑您的代码:
<html> <body> <script type="text/javascript"> var mycars = new Array() mycars[0] = "Saab" mycars[1] = "Volvo" mycars[2] = "BMW" for (i=0;i<mycars.length;i++) { document.write(mycars[i] + "<br />") } </script> </body> </html>
查看结果: