可以参考一下
<!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++){//一维长度是3
myarr[i]=new Array();
for(var j=0;j<6;j++){
myarr[i][j]=i*j;
document.write("a["+i+"]"+"["+j+"]="+myarr[i][j]+"    ");
}
document.write("<br>")
}
</script>
</head>
<body>
</body>
</html>