ekylin
2019-09-19 14:45
<!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<3; i++){
myarr[i]= new Array();
for (var j=0; j<6; j++){
myarr[i][j]= i*j;
document.write(myarr[i][j]+" ");
}
document.write("<br>");
}
</script>
</head>
<body>
</body>
</html>
哦,谢谢
var myarr() = new Array();
去掉 myarr()括号:
var myarr = new Array();
JavaScript进阶篇
468195 学习 · 21891 问题
相似问题