`

struts2 iterator status index 奇偶判断

 
阅读更多
<s:iterator id="topics" status="index">
    <tr>
					   
          <td><s:property value="#index.index+1" /></td>
						  
    </tr>
</s:iterator>

 


1:#status.odd 是否奇数行

2:#status.count 当前行数

3:#status.index 当前行的序号,从0开始『#status.count=#status.index+1』

4:#status.first 是否第一行

5:#status.last 是否最后一行

6:#status.modules(int) 当前行数取模
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics