创建二维数组(一维长度3,二维长度6),值为一维数组和二维数组索引值的积
<!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 = 1; i <= 3; i++) {
myarr[i] = new Array();
for(var j = 1;j<=6;j++){
myarr[i][j]=i*j;
document.write("myarr["+i+"]["+j+"]的值:"+myarr[i][j]+"<br>");
}
}
</script>
</head>
<body>
</body>
</html>