struts 奇偶行不同颜色

<logic:notEmpty name="pro_list">
    <logic:iterate id="listq" name="pro_list" indexId="index">
     <tr
      bgcolor="<%=(index.intValue() % 2 == 0) ? "#FFFFF9" : "#FFFFC9"%>">

      <td>
       <bean:write name="listq" property="t1" />
      </td>

       ...  ...

    </tr>
   </logic:iterate>
</logic:notEmpty>

你可能感兴趣的:(bean,struts)