js遍历一个map<string,list<Object>>
<script type="text/javascript" src="${pageContext.request.contextPath}/style/js/jquery-1.9.1.js"/> <script type="text/javascript"> var html = ""; var app = $("#fwlx_list"); $(function(){ $.ajax( { type : "POST", async : false, url : "${pageContext.request.contextPath}/index/fwlx_list", success : function(data) { var json = eval("("+data+")"); for (var prop in json) { // html += " key "+prop ; html += "<div class='bgsbcon' >"; html += "<ul>"; html += "<li style='width:90px; text-align:left;'><a href='#' style='font-size: 15px;' class='currgy'>"+prop+"</a></li>"; //遍历简单的pojo对象 for(var i in json[prop]){ //html += i + " value "+ json[prop][i].wxFuwuxiaoleiName ; html += "<li><a"; html += " href='${pageContext.request.contextPath}/index/pager_content?fwlx="+json[prop][i].wxFuwuxiaoleiName+"&px=${px}&area=${dist}'"; html += " name='chk_type'> "; if("${type}" == json[prop][i].wxFuwuxiaoleiName){ html += "<font color='red'>"+json[prop][i].wxFuwuxiaoleiName+"</font>"; }else{ html += ""+json[prop][i].wxFuwuxiaoleiName+""; } html += "</a></li>"; } html += "</div>"; app.append(html); } } }); }); </script>
<div class="product-wrap posone" id="fwlx_list"></div>
相关推荐
梦的天空 2020-08-25
阿斌Elements 2020-06-11
88274956 2020-11-03
Zhongmeishijue 2020-09-10
runner 2020-09-01
IdeaElements 2020-08-19
luvhl 2020-08-17
移动开发与培训 2020-08-16
ReunionIsland 2020-08-16
lyqdanang 2020-08-16
NARUTOLUOLUO 2020-08-03
MyNameIsXiaoLai 2020-07-08
星辰的笔记 2020-07-04
csstpeixun 2020-06-28
letheashura 2020-06-26
liaoxuewu 2020-06-26
OldBowl 2020-06-26
北京老苏 2020-06-25
Luffyying 2020-06-25