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

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;   });  });
原文地址:https://www.cnblogs.com/dxt510/p/7668409.html