获取JSON长度的方法
一、JSON获取代码:
functiongetJsonLength(jsonData){//获取JSON长度的方法varjsonLength=1;for(variteminjsonData){jsonLength++;}returnjsonLength;}
二、调试:
//console.log(getJsonLength(content));for(vari=1;i<getJsonLength(content);i++){//console.log(content[i]);console.log(content[i]);varline=content[i];//console.log(line.nodeName)}
三、效果:
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。