注册 登录
编程论坛 J2EE论坛

<tag:if test="${status.index%2==1 }"> 此处提示/tr没有开始标签</tag:if

sharbin 发布于 2011-05-07 23:19, 1046 次点击
<tag:if test="${status.index%2==1 }">
    </tr>
   </tag:if>
为什么提示tr没有开始标签,但我百分百肯定有的呀,而且嵌套也没问题        下面是代码
<tag:forEach var="currentFood" items="${sessionScope.foods } varStatus="status">
 
   <tag:if test="${status.index%2==0 }">
  <tr>
   </tag:if>
      <td width="313">
      <table height="151" border="0" style="left: 607px;">
        <tr>
          <td width="119" rowspan="3"><a href="details.jsp?foodId=${currentFood.foodID} } %>"><img src="images/${currentFood.foodImage}" width="114" height="111"></a></td>
          <td height="26" colspan="2"><A href=# target=_blank><STRONG>${currentFood.foodName }</STRONG></A></td>
          </tr>
        <tr>
          <td height="28" colspan="2"><FONT color=#ff0000>现价:人民币${currentFood.foodPrice }</>元</FONT><BR>
            <a href="#">${currentFood.remark }</a></td>
          </tr>
        <tr>
          <td height="67" colspan="2">&nbsp;</td>
          </tr>
        <tr>
          <td height="28">编号: ${currentFood.foodID }</td>
          <td width="71" align="center"><img src="images/buy_cn.gif" width="60" height="20"></td>
          <td width="35"><img src="images/detail_cn.gif" width="60" height="20"></td>
        </tr>
      </table>
      </td>
   <tag:if test="${status.index%2==1 }">
    </tr>
   </tag:if>
    </tag:forEach>
  
0 回复
1