入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

JavaScript二维数组的使用及删除指定元素

创建时间:2015-09-04 投稿人: 浏览次数:3788

JavaScript中是没有二维数组的

那么使用的时候,只有自己构造二维数组

首先定义一个一维数组

var picArrList=new Array(); //定义一维数组 

var sectionindex= 2; //或者其它任意序列号都可以,这里只是随便举个例子

if(!picArrList[sectionindex])	  
	     picArrList[sectionindex] = new Array();
var picindex = picArrList[sectionindex].length;
<pre class="html" name="code">alert (picArrList[sectionindex][1]);

声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。