jstl混合使用

来源:互联网 发布:ned stark知乎 编辑:程序博客网 时间:2024/05/22 15:14
<c:forEach items="${fn:split(item.tmp,',') }" var="val" varStatus="sq"><c:if test="${sq.index==0}">题目:${val }<br/></c:if><c:if test="${sq.index==1}">答案:${val}</c:if><c:if test="${sq.index==2}"><br/>耗时:<c:choose><c:when test="${val<60}">${val}秒</c:when><c:when test="${val>60 && val<900}">${fn:substringBefore(val/60,'.')}分${val%60}秒</c:when><c:otherwise>-</c:otherwise></c:choose></c:if><c:if test="${sq.index==3}"><br/>是否正确:<c:if test="${val==1}">正确</c:if><c:if test="${val==0}">错误</c:if></c:if></c:forEach>

0 0
原创粉丝点击