Struts2中 iterator隔行变色

<s:iterator value="itemPageList" status="t">
<tr id="<s:property value='id'/>" bgcolor="<s:property value="%{#t.count%2==0?'#c9cdd2':'#e7eaee'}"/>">

迭代的内容

</tr>

</s:iterator>

 

下面是另外一种

<s:if test="%{#t.index%2==1}">style=""</s:if>>

 

 

 

引用自:

http://blog.csdn.net/se_xiaofeng/article/details/7500448

posted @ 2017-04-24 10:53  Bruin.wang  阅读(507)  评论(0编辑  收藏  举报