xiuying 发表于 2013-2-5 01:25:01

<c:if>的使用

<c:if test="${2>1}">
    <c:out value="hello world!"/>
</c:if>


注:在test的右边也可以放EL表达式如
<c:forEach items="${entryList}" var="blogEntry" varStatus="status">
    <c:if test="${status.first}">
      <tr>
          <td align="left" class="blogDate">
            <c:out value="${blogEntry.created}"/>
          </td>
      </tr>
    </c:if>
</c:forEach>


entryList这个集合必须自己事先定义好。
页: [1]
查看完整版本: <c:if>的使用