jquery怎样过的jsp循环后的内容
<divregion="west"title="目录"split="true"style="width:300px"><divclass="easyui-panel"st...
<div region="west" title="目录" split="true" style="width: 300px">
<div class="easyui-panel" style="padding: 5px">
<ul class="easyui-tree">
<li><span>考题题库</span>
<ul>
<%
int geshu = 0;
HashMap hash = (HashMap) request.getAttribute("mulu");
Iterator iter = hash.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
Object key = entry.getKey();
%><li data-options="state:'closed'" class="zi"><span><%=key%></span>
<ul>
<%
ArrayList val = (ArrayList) entry.getValue();
for (int i = 0; i < val.size(); i++) {
geshu = geshu + 1;
%>
<li class="<%=geshu%>"><%=val.get(i)%></li>
<%
}
%>
</ul></li>
<%
}
%>
</ul></li>
</div>
</div> 展开
<div class="easyui-panel" style="padding: 5px">
<ul class="easyui-tree">
<li><span>考题题库</span>
<ul>
<%
int geshu = 0;
HashMap hash = (HashMap) request.getAttribute("mulu");
Iterator iter = hash.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry entry = (Map.Entry) iter.next();
Object key = entry.getKey();
%><li data-options="state:'closed'" class="zi"><span><%=key%></span>
<ul>
<%
ArrayList val = (ArrayList) entry.getValue();
for (int i = 0; i < val.size(); i++) {
geshu = geshu + 1;
%>
<li class="<%=geshu%>"><%=val.get(i)%></li>
<%
}
%>
</ul></li>
<%
}
%>
</ul></li>
</div>
</div> 展开
展开全部
没仔细看你代码,只是说个思路,你可以将值存在数组里,再循环输出数组里的值,类似
for(var i=0;i<arr.length;i++){
//arr[i];
//就是获得的值
}
for(var i=0;i<arr.length;i++){
//arr[i];
//就是获得的值
}
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询