//<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<% Random rnd= new Random(); %>
<c:set var="luck" value="<%=rnd.nextInt(10) %>"/>
<c:choose>
<c:when test="${luck==6}">恭喜你获得一等奖</c:when>
<c:when test="${luck==7}">恭喜你获得一等奖</c:when>
<c:when test="${luck==8}">恭喜你获得一等奖</c:when>
<c:otherwise>谢谢参与!<a href=" "><button>再来一次</button></a></c:otherwise>
</c:choose>
JSP c :choose
最新推荐文章于 2023-11-27 09:41:03 发布