「JSTL」c:ifで複数条件を判定するサンプル

書式
c:if test=条件式
サンプルコード

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<c:if test="${uid >= 100 and uid <= 180}">
AAA
</c:if>
<c:if test="${uid > 180 or uid < 100}">
BBB
</c:if>
<c:if test="${uid >= 100 and uid <= 180}"> AAA </c:if> <c:if test="${uid > 180 or uid < 100}"> BBB </c:if>
<c:if test="${uid >= 100 and uid <= 180}">
  AAA 
</c:if>
<c:if test="${uid > 180 or uid < 100}">
  BBB
</c:if>

 

JSTL

Posted by arkgame