输不出结果,代码问题在哪
<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>