1. 程式人生 > >jsp jstl標簽庫 el表達式

jsp jstl標簽庫 el表達式

inpu zone etl capable group type 其它 time com

一、JSTL標簽是什麽?

提供了對國際化(I18N)的支持,它可以根據發出請求的客戶端地域的不同來顯示不同的語言。

同時還提供了格式化數據和日期的方法。實現這些功能需要I18N格式標簽庫(I18N-capable formation tags liberary)。

引入該標簽庫的方法為:<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

二、I18N格式標簽庫提供了11個標簽,這些 標簽從功能上可以劃分為3類如下:

(1)數字日期格式化。formatNumber標簽、formatData標簽、parseNumber標簽、parseDate標簽、timeZone標簽、setTimeZone標簽。

(2)讀取消息資源。bundle標簽、message標簽、setBundle標簽。

(3)國際化。setlocale標簽、requestEncoding標簽。

三、最常用到的標簽:formatData標簽(格式化日期),formatNumber標簽(格式化數據)

東奧集團端:廢舊和其它收入項目管理 --編輯--稅率字段顯示四位小數例子:

<input type="text" class="required-bg" size="14" maxlength="6" name="tax" id="tax"  value="<fmt:formatNumber value="${OtherIncomeGroup.tax }" pattern="#0.0000"></fmt:formatNumber>"  />

jsp jstl標簽庫 el表達式