1.数组
var array = [];
var length = array.length;
2.JSON对象
1)方法1:
var pBzjtJson ={"SORT":1,"TITLE":"12324","RANK":1,"TYPE_TAG":"班子集体责任","SR_CLASS_ID":"a2bdfa5b5f684d5d9da5c055117c94c5"};
var length = Object.keys(pBzjtJson).length;
console.log(length);//5
2)方法2:
function getJsonLength(jsonData){
var jsonLength = 0;
for(var item in jsonData){
jsonLength++;
}
return jsonLength;
}
参考:
最新评论
本来在正常下载,突然就不能下载,并出现报错:a socket operation was attempted to an unreachable network。请问是什么原因呢
试了,还是不行,能不能更新一下
试了,确实不行,能不能更新一下
也推荐一下我自己写的 https://twitdown.com