?? fmt_parsenumber.jsp
字號:
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=gb2312" %>
本地環境為“en_US”解析字符串“$123,456,789.00”:
<fmt:parseNumber value="$123,456,789.00" type="currency" parseLocale="en_US"/>
<hr/>
解析整個數值字符串“123,456,789%”:
<fmt:parseNumber value="123,456,789%" type="percent" /><hr />
只解析“123,456,789%”的整數部分:
<fmt:parseNumber value="123,456,789%" type="percent" integerOnly="true"/><hr />
同時設置type和pattern屬性,后者優先于前者:
<fmt:parseNumber value="12.3" type="currency" pattern=".000" />
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -