码迷,mamicode.com
首页 > Web开发 > 详细

jstl中的choose标签

时间:2019-09-07 00:40:00      阅读:146      评论:0      收藏:0      [点我收藏+]

标签:other   html   Fix   char   setattr   The   efi   prefix   text   

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<title>choose标签</title>
</head>
<body>
<%
request.setAttribute("number",5);
%>

<c:choose>
<c:when test="${number==1}">星期一</c:when>
<c:when test="${number==2}">星期二</c:when>
<c:when test="${number==3}">星期三</c:when>
<c:when test="${number==4}">星期四</c:when>
<c:when test="${number==5}">星期五</c:when>
<c:when test="${number==6}">星期六</c:when>
<c:when test="${number==7}">星期日</c:when>
<c:otherwise>数字数据有误</c:otherwise>
</c:choose>
</body>
</html>

jstl中的choose标签

标签:other   html   Fix   char   setattr   The   efi   prefix   text   

原文地址:https://www.cnblogs.com/newcityboy/p/11478883.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!