jsp标签-05-05
2019-05-06 本文已影响0人
封_绝
jsp if标签 test=“boolean”
<c:if test="判断语句">
</c:if>
jjsp if else 语句
<c:choose>
<c:when test="判断语句">
</c:when>
<c:other>
</c:other>
</c:choose>
<!--相当于-->
${判断语句:a?b}
<c:when test="${detail == 0}">
<!--而不是下面这样-->
<c:when test="detail == 0">
例如:
<c:if test="${detail != 0}">
<c:choose>
<c:when test="${detail == 1}">
<button id="returnCar" class="btn green c-save-btn">还车</button>
</c:when>
<c:otherwise>
<button type="submit" id="saveCallCarBtn" class="btn green c-save-btn">保存
</button>
<button type="button" id="restting" class="btn green c-save-btn"
onclick="history.go(-1)">返回
</button>
</c:otherwise>
</c:choose>
</c:if>