struts iterator 标签 之 indexId
生活随笔
收集整理的這篇文章主要介紹了
struts iterator 标签 之 indexId
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
iterator 標簽 之 indexId定義的是從0開始編號的,如果從1開始編號,可按以下方法實現
<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>?
總結
以上是生活随笔為你收集整理的struts iterator 标签 之 indexId的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: hibernate之HQL传中文参数乱码
- 下一篇: 使表格中的文字自动换行