<%@taglib uri='http://java.sun.com/jsp/jstl/fmt' prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
?
1.格式化日期:
<fmt:formatDate value="${date}" patt>ern="yyyy-MM-dd">
?
2.格式化 数字
<fmt:formatNumber value="${payAmount}" pattern="0.00"/>?
?
?3.indexOf
<core:if test="${fn:indexOf('1212','2')>0}">
?abcdefg
</core:if>
?
?
1.数组:
${str[0]}.
如果为map也是在中括号里面写上key.即可取出值.
2.forEach
<core:forEach?items="${orgInfoAllList}"?var="orgInfoAllList"?varStatus="idx">
???? ?<core:if?test="${orgInfoAllList.orgId?==list.orgId}">${orgInfoAllList.orgName}</core:if>
</core:forEach>
3格式化时间:
<%@taglib?uri="http://java.sun.com/jsp/jstl/fmt"?prefix="fmt"?%>
<fmt:formatDate?pattern="yyyy-MM-dd?HH:mm:ss"?value="${list.logTime?}"/>
注意:①?mm?分,MM月
?????②?hh是12进制,HH是24小时进制.
4.格式化为2位小数位
<fmt:formatNumber?value="${list.amount?}"?pattern="0.00"/>
5.
取得list的size
${fn:length(resultList)
6.????判断是否为空和使用map取值
<c:if?test="${empty?list.accType}">
<select?id="accType"?name="accType">
<c:forEach?items="${bankMap}"?var="bankMap">
<option?value="${bankMap.key}">${bankMap.value}</option>
</c:forEach>
</select>
??</c:if>
<core:if?test="${empty?resultList}">
?</core:if> ???
7.choose,when
<c:choose>
?????? <c:when?test="${updateVo.status?==-1}">
</c:when>
?<c:otherwise>?
</c:otherwise>
?</c:choose>