老师请您出个答案,照顾下菜鸟
不会的时候可以参考下 同学代码里面的 点赞多的还是写的不错的
<!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;
}
}
</script>
</head>
<body>
</body>
</html>
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;
}
}
<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数组</title>
<script type="text/javascript">
//创建数组
var arr = ['*','##',"***","&&","****","##*"];
arr[7] = "**";
//显示数组长度
alert("数组长度"+arr.length);
//将数组内容输出,完成达到的效果。
for(var i=0;i<arr.length;i++)
{
document.write(arr[i]+"<br/>");
}
</script>
</head>
<body>
</body>
</html>