为什么我的出不来呢,求大神指点
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]);
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]);
2018-03-16
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>二维数组</title>
<script type="text/javascript">
var line = 3;
var column = 6;
var myarr = new Array();
for(var i=0;i<line;i++)
{
myarr[i] = new Array();
for(var j=0;j<column;j++)
{
myarr[i][j] = i*j;
document.write(myarr[i][j]+"<br>");
}
}
</script>
</head>
<body>
</body>
</html>
举报