从后台获取的数据是数组中嵌套数组

var str = "";
for(var i=0; i<data.length; i++) { str +="<div class='exfansCon clearfix'>" +    "<img src='"+urllogo+data[i].HeadImage+"' alt=''>" + "<div class='exfansText'>" + "<span>"+data[i].Name+"</span>" + "<div class='cropN'></div> " + "<i>粉丝:</i><em>"+data[i].fansCount+"</em>" + "</div> " + "<div class='myexAddAtten'>" + "<span>添加 + </span>" + "</div>" + "</div> " + "<hr>"; } $('.expertInt'
).html(str); $.each(data,function(a,b){   var value="";    $.each(b.alltag,function(c,d){   value+= d.name;   $(".cropN")[a].innerText=value;   });  });

 

posted @ 2017-10-14 20:10  党欣彤  阅读(1882)  评论(0编辑  收藏  举报