<!DOCTYPE html> <html> <body> <script> var i; var c1=new Array("A","B","C"); var c2=["D","E","F","G"]; var c3= new Array(); c3[0]="H"; //这里不可以和上一句用,连起来一起定义 c3[1]="I"; for (i=0;i<c1.length;i++) //注意这个地方,三个条件的间隔符是;不是, { document.write(c1[i]); } document.write("<br />"); for (i=0;i<c2.length;i++) { document.write(c2[i]); } document.write("<br />"); for (i=0;i<c3.length;i++) { document.write(c3[i]); } </script> </body> </html>