JQuery EasyUI 数字格式化处理示例
时间:2021-06-24 08:21:19|栏目:jquery|点击: 次
设置显示时间戳
<%
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/>
上一篇:使用jQuery和ajax代替iframe的方法(详解)
栏 目:jquery
下一篇:jquery实现点击a链接,跳转之后,该a链接处显示背景色的方法
本文地址:http://www.codeinn.net/misctech/147482.html