- 判断是否为空
<c:if test="${empty str}"> str为空</c:if> <c:if test="${not empty str}"> str不为空</c:if>
- 多条件逻辑判断
<c:if test="${not empty str1 && not empty str2}"> str1不为空,str2不为空</c:if>
JSP中 <c:if test=““> 如何判断?
最新推荐文章于 2023-11-06 11:40:44 发布
<c:if test="${empty str}"> str为空</c:if>
<c:if test="${not empty str}"> str不为空</c:if>
<c:if test="${not empty str1 && not empty str2}"> str1不为空,str2不为空</c:if>