JavaWeb-JSP JSTL标签 -2023-04-09

<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/4/9
  Time: 15:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Score</title>
</head>
<body>

<h2>成绩判断页面</h2>
<hr>
<form action="corewhen.jsp" method="get">
  <input type="text" name="score" value="${param.score}">
  <input type="submit">

  <hr>

  <c:choose >
    <c:when test="${param.score>=90}">
      成绩优秀!
    </c:when>

    <c:when test="${param.score>=80}">
      成绩良好!
    </c:when>

    <c:when test="${param.score>=60}">
      成绩一般!
    </c:when>

    <c:when test="${param.score<60}">
      成绩不及格!
    </c:when>
  </c:choose>

</form>


</body>
</html>
posted @ 2023-04-09 15:23  Rui2022  阅读(12)  评论(0编辑  收藏  举报