我尝试使用的JSTL中if()else if()else if()
的等效项是什么
<c:choose>
<c:when></c:when>
<c:when></c:when><c:otherwise>
<c:when></c:when>
</c:otherwise>
</c:choose>
但它给了错误。
最佳答案
那是因为您混淆了标签。它应该是:
<c:choose>
<c:when test="..."> ... </c:when>
<c:when test="..."> ... </c:when>
<c:otherwise> ... </c:otherwise>
</c:choose>
关于jsp - JSTL中的 "if elseif elseif"的等效项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7160348/