为什么我的输出没效果,页面不显示值
<script type="text/javascript">
var myarr=new Array();
for(var i=0;i<3;i++){
var myarr[i]=new Array();
for(var j=0;j<6;j++){
myarr[i][j]=i*j;
}
}
document.write("myarr[0][2]");
<script type="text/javascript">
var myarr=new Array();
for(var i=0;i<3;i++){
var myarr[i]=new Array();
for(var j=0;j<6;j++){
myarr[i][j]=i*j;
}
}
document.write("myarr[0][2]");
2016-01-18
<!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;
if(j!=5)
{document.write("myarr["+i+"]["+j+"]值为:"+myarr[i][j])}
else
{document.write("myarr["+i+"]["+j+"]值为:"+myarr[i][j]+"<br>")}
}
}
</script>
</head>
<body>
</body>
</html>
举报