日期:2014-05-16  浏览次数:20454 次

js 使用二维数组储存数据

<script language="javascript" type="text/javascript">
function init(){
var arrs = new Array();
for (var i = 0; i < 6; i++) {
arrs[i] = new Array();
arrs[i][0] = i;
arrs[i][1] = i+1;
arrs[i][2] = i+2;
arrs[i][3] = i+3;
arrs[i][4] = i+4 +"!";
}
alert(arrs);
}
</script>