请老师检查一下

请老师检查一下

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>2-9自由编程</title>
</head>
<body>
    <%
        request.setAttribute("day","TUESDAY");
        //request.setAttribute("day","abc");
    %>
    <c:choose>
        <c:when test="${requestScope.day == 'MONDAY' }">
        <h1 style="color:blue">星期一</h1>
    </c:when>
        <c:when test="${requestScope.day == 'TUESDAY' }">
        <h1 style="color:blue">星期二</h1>
    </c:when>
        <c:when test="${requestScope.day == 'WEDNESDAY' }">
        <h1 style="color:blue">星期三</h1>
    </c:when>
        <c:when test="${requestScope.day == 'THURSDAY' }">
        <h1 style="color:blue">星期四</h1>
    </c:when>
        <c:when test="${requestScope.day == 'FRIDAY' }">
        <h1 style="color:blue">星期五</h1>
    </c:when>
        <c:when test="${requestScope.day == 'SATURDAY' }">
        <h1 style="color:blue">星期六</h1>
    </c:when>
        <c:when test="${requestScope.day == 'SUNDAY' }">
        <h1 style="color:blue">星期日</h1>
    </c:when>
        <c:otherwise>
        <h1 style="color:red">内容不对哦</h1>
</c:otherwise>
</c:choose>
</body>
</html>

谢谢老师。

正在回答

登陆购买课程后可参与讨论,去登陆

1回答

同学完成的不错,很棒哦,加油!祝学习愉快~

问题已解决,确定采纳
还有疑问,暂不采纳

恭喜解决一个难题,获得1积分~

来为老师/同学的回答评分吧

0 星
请稍等 ...
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号

在线咨询

领取优惠

免费试听

领取大纲

扫描二维码,添加
你的专属老师