Guy林
2017-05-12 10:59
<script type="text/javascript">
var myarr = new Array();
for(var i = 0; i<3; i++){
myarr[i] = new Array();
for(var j = 0; j<6; j++){
myarr[i][j] = i*j;
}
}
function showMyarr(){
for(var i = 0; i < myarr.length; i++){
document.write("第"+i+"行数组:");
for(var j = 0; j < myarr[i].length; j++){
document.write(myarr[i][j]);
if(j!=myarr[i].length-1){
document.write(" ");
}
document.write("<br>");
}
}
}
</script>
</head>
<body>
<input type="button" value="输出数组" onclick="showMarr()"/>
</body>
函数名写错。。晕死
JavaScript进阶篇
468061 学习 · 21891 问题
相似问题