struts iterator 标签 之 indexId

来源:互联网 发布:淘宝实物不符怎么处理 编辑:程序博客网 时间:2024/04/29 19:45
<logic:iterate id="element" name="RsBean" property="page" indexId="index">
<bean:write name="index"/> <!--默认从0开始编号-->
</logic:iterate>

<logic:iterate id="element" name="RsBean" property="page" indexId="index">
<%=Integer.parseInt(index.toString())+1%> <!--从1开始编号-->
</logic:iterate>
<logic:iterate id="element" name="RsBean" property="page" indexId="index">
<%=index.intValue()+1%> <!--从1开始编号-->
</logic:iterate>
原创粉丝点击