struts1-杂记

一、查看迭代顺序

  

<logic:iterate id="tpxw" name="tpxwList" indexId="ind">
	<% if (ind.intValue() < size - 1) { %>
	     //若mtitleimgfilename为空或者null,则没有图片显示,所以添加新闻的时候应该选择“标题图片”
	     var pic<%=ind.intValue()%>= '/<bean:write
	     name="tpxw" property="mtitleimgfilename" />|';
	     var text<%=ind.intValue()%>='<bean:write name="tpxw" property="mtitle" />|';
	     var link<%=ind.intValue()%>='ShowMsg.jsp?id=<bean:write name="tpxw" property="mid" />|';
	<%} else {%>
	     var pic<%=ind.intValue()%>= '/<bean:write name="tpxw" property="mtitleimgfilename" />';
	     var text<%=ind.intValue()%>='<bean:write name="tpxw" property="mtitle" />';
	     var link<%=ind.intValue()%>='ShowMsg.jsp?id=<bean:write name="tpxw" property="mid" />';
	<%}%>
</logic:iterate>

猜你喜欢

转载自x125858805.iteye.com/blog/1781875