//關(guān)聯(lián)數(shù)組長度
function getObjLength(obj){
var count=0;
for(var name in obj){
if(typeof obj[name] == "object"){
count+=getObjLength(obj[name]);
}else{
count++;
}
}
return count;
}