jstl fmt功能说明
来源:百度文库 编辑:神马文学网 时间:2024/05/11 17:09:38
所有标签:
Tags
fmt:requestEncoding
fmt:setLocale
fmt:timeZone
fmt:setTimeZone
fmt:bundle
fmt:setBundle
fmt:message
fmt:param
fmt:formatNumber
fmt:parseNumber
fmt:formatDate
fmt:parseDate
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
jstl fmt 函数大全
主要功能格式化
日期格式(2008年5月5日22点00分23秒)
保留两位小数
格式数字(45,678.234)
格式百分比(23%)
其他
例
例:
例
三种数字类型参数:currency,number,percent
type="both" 输入日期也同时输出具体时间
timeStyle="long" 时间以“长”格式输出 差别:下午02时06分59秒 与 14:06:59
dateStyle="long" 日期以“长”格式输出 差别:2006年9月7日 与 2006-9-7
四种长短参数:long,short,medium,full