<script language="JavaScript"> //定义二维数组并初始化 var aEg = new Array( ["a1","a2","a3"], ["b1","b2","b3"]);var i, j; //输出二维数组元素的值 for (i=0; i < aEg.length; i++) { for (j=0; j < aEg[i].length; j++) { document.write(aEg[i][j]); document.write(' '); } document.write('<BR>'); } </script>