1.c:if

<c:if test=""></c:if>

c:when的test里可以是变量或者是一个EL表达式,其结果应该是true或者false。

EL表达式具体参考http://blog.csdn.net/yolanda_nuonuo/article/details/52680036

2.c:choose

<c:choose>

        <c:whentest="">

                情况一

        </c:when>

        <c:otherwise>

                情况二

       </c:otherwise>

</c:choose>

3.c:forEach

<c:forEachbegin="1"end="3" step="1"varStatus="leftInfo">

<div>

</div>

</c:forEach>

这里的${leftInfo.current}会从1取到3

4.根据条件改变一个class

<divclass="boarding<c:if test=''>_p</c:if>" >

可以在css文件中写两个属性,一个是boarding一个是boarding_p

 

相关文章:

  • 2021-11-23
  • 2021-08-29
  • 2021-08-27
  • 2022-01-16
  • 2021-07-14
  • 2022-01-28
  • 2021-07-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2022-02-13
相关资源
相似解决方案