<c:choose>
<c:when test="${studentneedsignBO.status != 1 }">
<span>不需要签到</span>
</c:when>
<c:otherwise>
<c:if test="${studentneedsignBO.signStatus == 1 }">
<span>准时签到</span>
</c:if>
<c:if test="${studentneedsignBO.signStatus == 2 }">
<span>超时签到</span>
</c:if>
<c:if test="${studentneedsignBO.signStatus == 3 }">
<span>未签到</span>
</c:if>
</c:otherwise>
<c:when test="${studentneedsignBO.status != 1 }">
<span>不需要签到</span>
</c:when>
<c:otherwise>
<c:if test="${studentneedsignBO.signStatus == 1 }">
<span>准时签到</span>
</c:if>
<c:if test="${studentneedsignBO.signStatus == 2 }">
<span>超时签到</span>
</c:if>
<c:if test="${studentneedsignBO.signStatus == 3 }">
<span>未签到</span>
</c:if>
</c:otherwise>
</c:choose>
JSTL中<c:if>标签没有对应的else因此采用
<c:choose>
<c:when test=""> <!--如果 -->
</c:when>
<c:otherwise> <!--否则 -->
</c:otherwise>
</c:choose>
其他相关标签查询下面网址:
http://www.runoob.com/jsp/jsp-jstl.html

本文介绍JSTL中的条件标签<c:choose>、<c:when>和<c:otherwise>的使用方法,用于根据不同条件展示不同内容,适用于Web应用开发。
1021

被折叠的 条评论
为什么被折叠?



