struts iterator 标签 之 indexId
生活随笔
收集整理的這篇文章主要介紹了
struts iterator 标签 之 indexId
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
iterator 標(biāo)簽 之 indexId定義的是從0開始編號(hào)的,如果從1開始編號(hào),可按以下方法實(shí)現(xiàn)
<logic:iterate id="element" name="RsBean" property="page" indexId="index">
<bean:write name="index"/> <!--默認(rèn)從0開始編號(hào)-->
</logic:iterate>
<logic:iterate id="element" name="RsBean" property="page" indexId="index">
<%=Integer.parseInt(index.toString())+1%> <!--從1開始編號(hào)-->
</logic:iterate>?
總結(jié)
以上是生活随笔為你收集整理的struts iterator 标签 之 indexId的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: hibernate之HQL传中文参数乱码
- 下一篇: 使表格中的文字自动换行