<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>c_if</title>
</head>
<body>
<c:set scope="request" var="num1" value="10"></c:set>
<c:set scope="request" var="num2" value="2"></c:set>
<c:if test="${num1 > num2}">
<h1>${num1} > ${num2}</h1>
</c:if>
<c:if test="${num1 < num2}">
<h1>${num1} < ${num2}</h1>
</c:if>
</body>
</html>
05-20
7379
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交