choose、when、otherwise标签的用法 -通常这三个标签被放在一起配合使用 -<c:choose>标签嵌套在<c:when>和<c:otherwise>标签外面作为他们的父标签来使用 -其中choose和when标签也可以一起组合使用 <!-- choose、when、otherwise标签的用法 --> <!-- 第一种用法 --> <c:choose> <c:when test="${param.score>=60&¶m.score<=100}"> <c:out value="通过"></c:out> </c:when> <c:when test="${param.score>=0&¶m.score<=59}"> <c:out value="不通过"></c:out> </c:when> <c:otherwise> <c:out value="输入错误!!"></c:out> </c:otherwise> </c:choose><br> <!-- 第二种用法 --> <c:choose> <c:when test="${param.score==100 }"> <c:out value="太棒啦,你是第一名!!!"></c:out> </c:when> </c:choose> Ps:用法类似于switch——case——default。
用法二:只使用choose标签和when标签