用jstl进行判断比较好,请看
<logic:iterate id="bill" name="billList">
<c:choose>
<c:when test="${bill.flag==1}">
<tr align="center" class="tablered">
<td width="128" height="20" class="tablered"><S><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><FONT Color="ff0000"><bean:write name="bill" property="billNumber" /></font></a></S></td>
<td width="128" height="20"><bean:write name="bill" property="contractNumber" /></td>
<td width="128" height="20"><bean:write name="bill" property="price" /></td>
<td width="128" height="20"><bean:write name="bill" property="date" /></td>
<td width="128" height="20"><bean:write name="bill" property="creator" /></td>
<td width="128" height="20"><bean:write name="bill" property="lastUpdated" /></td>
<td width="128" height="20">已删除</td>
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><font color=red>详细信息</font></a></td>
</tr>
</c:when>
<c:when test="${tempCount%2==0&&bill.flag!=1}">
<tr align="center" class="tablegrey">
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><bean:write name="bill" property="billNumber" /></a></td>
<td width="128" height="20"><bean:write name="bill" property="contractNumber" /></td>
<td width="128" height="20"><bean:write name="bill" property="price" /></td>
<td width="128" height="20"><bean:write name="bill" property="date" /></td>
<td width="128" height="20"><bean:write name="bill" property="creator" /></td>
<td width="128" height="20"><bean:write name="bill" property="lastUpdated" /></td>
<td width="128" height="20"><a href="bill.do?action=delete&id=<bean:write name="bill" property="id" />">删除</a></td>
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')">详细信息</a></td>
</tr>
</c:when>
<c:otherwise>
<tr align="center">
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><bean:write name="bill" property="billNumber" /></a></td>
<td width="128" height="20"><bean:write name="bill" property="contractNumber" /></td>
<td width="128" height="20"><bean:write name="bill" property="price" /></td>
<td width="128" height="20"><bean:write name="bill" property="date" /></td>
<td width="128" height="20"><bean:write name="bill" property="creator" /></td>
<td width="128" height="20"><bean:write name="bill" property="lastUpdated" /></td>
<td width="128" height="20"><a href="bill.do?action=delete&id=<bean:write name="bill" property="id" />">删除</a></td>
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')">详细信息</a></td>
</tr>
</c:otherwise>
</c:choose>
<c:set var="tempCount" value="${tempCount+1}" />
</logic:iterate>
<logic:iterate id="bill" name="billList">
<c:choose>
<c:when test="${bill.flag==1}">
<tr align="center" class="tablered">
<td width="128" height="20" class="tablered"><S><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><FONT Color="ff0000"><bean:write name="bill" property="billNumber" /></font></a></S></td>
<td width="128" height="20"><bean:write name="bill" property="contractNumber" /></td>
<td width="128" height="20"><bean:write name="bill" property="price" /></td>
<td width="128" height="20"><bean:write name="bill" property="date" /></td>
<td width="128" height="20"><bean:write name="bill" property="creator" /></td>
<td width="128" height="20"><bean:write name="bill" property="lastUpdated" /></td>
<td width="128" height="20">已删除</td>
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><font color=red>详细信息</font></a></td>
</tr>
</c:when>
<c:when test="${tempCount%2==0&&bill.flag!=1}">
<tr align="center" class="tablegrey">
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><bean:write name="bill" property="billNumber" /></a></td>
<td width="128" height="20"><bean:write name="bill" property="contractNumber" /></td>
<td width="128" height="20"><bean:write name="bill" property="price" /></td>
<td width="128" height="20"><bean:write name="bill" property="date" /></td>
<td width="128" height="20"><bean:write name="bill" property="creator" /></td>
<td width="128" height="20"><bean:write name="bill" property="lastUpdated" /></td>
<td width="128" height="20"><a href="bill.do?action=delete&id=<bean:write name="bill" property="id" />">删除</a></td>
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')">详细信息</a></td>
</tr>
</c:when>
<c:otherwise>
<tr align="center">
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')"><bean:write name="bill" property="billNumber" /></a></td>
<td width="128" height="20"><bean:write name="bill" property="contractNumber" /></td>
<td width="128" height="20"><bean:write name="bill" property="price" /></td>
<td width="128" height="20"><bean:write name="bill" property="date" /></td>
<td width="128" height="20"><bean:write name="bill" property="creator" /></td>
<td width="128" height="20"><bean:write name="bill" property="lastUpdated" /></td>
<td width="128" height="20"><a href="bill.do?action=delete&id=<bean:write name="bill" property="id" />">删除</a></td>
<td width="128" height="20"><a href="#" onclick="javascript:popWindow('billOp.do?action=detail&id=<bean:write name="bill" property="id" />')">详细信息</a></td>
</tr>
</c:otherwise>
</c:choose>
<c:set var="tempCount" value="${tempCount+1}" />
</logic:iterate>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货