例 1.6(二维数组)
<!--马克-to-win:的用途是那些不支持 JavaScript 的浏览器会把js脚本作为页面的内容来显示。为了防止这种情况发生,可以使用这样的 HTML 注释标签:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<SCRIPT LANGUAGE="JavaScript">
<!--
var a = new Array(new Array(8, 4, 6, 7), new Array(8, 9, 1, 6));
//马克-to-win或var a=[[8, 4, 6, 7],[8, 9, 1, 6]];
for (var i = 0; i < 2; i++) {
for (var j = 0; j < 4; j++)
document.write("a[" + i + "][" + j + "] = " + a[i][j] );
document.write("<BR>");
更多内容请见原文,文章转载自:https://blog.csdn.net/qq_43650923/article/details/100134469