关于js中二维数组的使用。为什么alert数组显示为空呢? 80
//获得所有配置参数的数组,将所有为隐藏对象放置到数组中functiongetAllParamArr(){varallParamArr=newArray();allPar...
//获得所有配置参数的数组,将所有为隐藏对象放置到数组中
function getAllParamArr(){
var allParamArr = new Array();
allParamArr['allParamTag'] = new Array();
allParamArr['info'] = new Array();
var paramManu = $('#allParamTag li:not(.bar)');
var paramManuLen = paramManu.length;
var paramList = $('.info:not(:hidden)');
var paramListLen = paramList.length;
//标题数组对象
for (var i=0; i<paramManuLen; i++)
{
allParamArr['allParamTag'][i] = paramManu.eq(i);
}
//所有列数组对象
for (var j=0; j<paramListLen; j++)
{
for (var m=0; m<paramManuLen; m++)
{
allParamArr['info'][j] = new Array();
allParamArr['info'][j][m] = paramList.eq(m).children("li:not(.bar)").eq(j);
}
}
return allParamArr;
} 展开
function getAllParamArr(){
var allParamArr = new Array();
allParamArr['allParamTag'] = new Array();
allParamArr['info'] = new Array();
var paramManu = $('#allParamTag li:not(.bar)');
var paramManuLen = paramManu.length;
var paramList = $('.info:not(:hidden)');
var paramListLen = paramList.length;
//标题数组对象
for (var i=0; i<paramManuLen; i++)
{
allParamArr['allParamTag'][i] = paramManu.eq(i);
}
//所有列数组对象
for (var j=0; j<paramListLen; j++)
{
for (var m=0; m<paramManuLen; m++)
{
allParamArr['info'][j] = new Array();
allParamArr['info'][j][m] = paramList.eq(m).children("li:not(.bar)").eq(j);
}
}
return allParamArr;
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询