<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>二维数组</title><script type="text/javascript">var myarr=new Array();for(var i=0;i<=2;i++){ var myarr[i]=new Array(); for(var k=0;k<=5;k++){ myarr[i][k]=i*k; }}function shArr(){ for(var i=0;i<=2;i++){ for(var k=0;k<=5;k++){ document.write(myarr[i][k]); } document.write("<br/>"); }}</script></head><body> <input type="button" onClick="shArr()" value="点击显示数组" /></body></html>
添加回答
举报
0/150
提交
取消