设置显示时间戳
<%
request.setAttribute("currentTimeStamp",Calendar.getInstance().getTime());
%>
显示:2009-11
<fmt:formatDate pattern="yyyy-MM" value="${currentTimeStamp}"/> <br/>
显示:2009-11-30 23:47:06
<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${currentTimeStamp}"/> <br/>
显示:$12.00
<fmt:formatNumber value="12" type="currency" pattern="$.00"/> <br/>
显示:$12.0
<fmt:formatNumber value="12" type="currency" pattern="$.#"/> <br/>
¥12.0
<fmt:formatNumber value="12" type="currency" pattern="¥.00"/> <br/>
12.00元
<fmt:formatNumber value="12" type="currency" pattern="#0.00元"/> <br/>
¥12.00
<fmt:formatNumber value="12" type="currency"/> (那个货币的符号和当前web服务器的 local 设定有关)<br/>
123456.79
<fmt:formatNumber value="123456.7891" pattern="#0.00"/> <br/>
123,456.79
<fmt:formatNumber value="123456.7891" pattern="#,#00.00"/> <br/>
.79
<fmt:formatNumber value="0.7891" pattern="#.00"/> <br/>
12.34%
<fmt:formatNumber value="0.1234" type="percent" pattern="#0.00%"/><br/>
1,200%
<fmt:formatNumber value="12" type="percent" /><br/>
1200.00%
<fmt:formatNumber value="12" type="percent" pattern="#0.00%"/><br/>
<%
request.setAttribute("currentTimeStamp",Calendar.getInstance().getTime());
%>
显示:2009-11
<fmt:formatDate pattern="yyyy-MM" value="${currentTimeStamp}"/> <br/>
显示:2009-11-30 23:47:06
<fmt:formatDate pattern="yyyy-MM-dd HH:mm:ss" value="${currentTimeStamp}"/> <br/>
显示:$12.00
<fmt:formatNumber value="12" type="currency" pattern="$.00"/> <br/>
显示:$12.0
<fmt:formatNumber value="12" type="currency" pattern="$.#"/> <br/>
¥12.0
<fmt:formatNumber value="12" type="currency" pattern="¥.00"/> <br/>
12.00元
<fmt:formatNumber value="12" type="currency" pattern="#0.00元"/> <br/>
¥12.00
<fmt:formatNumber value="12" type="currency"/> (那个货币的符号和当前web服务器的 local 设定有关)<br/>
123456.79
<fmt:formatNumber value="123456.7891" pattern="#0.00"/> <br/>
123,456.79
<fmt:formatNumber value="123456.7891" pattern="#,#00.00"/> <br/>
.79
<fmt:formatNumber value="0.7891" pattern="#.00"/> <br/>
12.34%
<fmt:formatNumber value="0.1234" type="percent" pattern="#0.00%"/><br/>
1,200%
<fmt:formatNumber value="12" type="percent" /><br/>
1200.00%
<fmt:formatNumber value="12" type="percent" pattern="#0.00%"/><br/>
标签:
EasyUI,数字格式化
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“JQuery EasyUI 数字格式化处理示例”评论...