Jsp-jstl-format-formatnumber-tag
提供:Dev Guides
JSTL-コア<fmt:formatNumber>タグ
属性
Attribute | Description | Required | Default |
---|---|---|---|
Value | Numeric value to display | Yes | None |
type | NUMBER, CURRENCY, or PERCENT | No | Number |
pattern | Specify a custom formatting pattern for the output. | No | None |
currencyCode | Currency code (for type = "currency") | No | From the default locale |
currencySymbol | Currency symbol (for type = "currency") | No | From the default locale |
groupingUsed | Whether to group numbers (TRUE or FALSE) | No | true |
maxIntegerDigits | Maximum number of integer digits to print | No | None |
minIntegerDigits | Minimum number of integer digits to print | No | None |
maxFractionDigits | Maximum number of fractional digits to print | No | None |
minFractionDigits | Minimum number of fractional digits to print | No | None |
var | Name of the variable to store the formatted number | No | Print to page |
scope | Scope of the variable to store the formatted number | No | page |
S.No. | Symbol & Description |
---|---|
1 |
数字を表します。 |
2 |
E 指数形式で表します。 |
3 |
# 数字を表します。 0を不在として表示します。 |
4 |
. 小数点のプレースホルダーとして機能します。 |
5 |
, グループ化区切りのプレースホルダーとして機能します。 |
6 |
; フォーマットを区切ります。 |
7 |
- デフォルトの負のプレフィックスとして使用されます。 |
8 |
% 100で乗算し、パーセンテージで表示します。 |
9 |
? 1000倍して、ミルごとに表示します。 |
10 |
¤ 通貨記号を表します。行動通貨記号に置き換えられました。 |
11 |
X プレフィックスまたはサフィックスに他の文字を使用できることを示します。 |
12 |
'' プレフィックスまたはサフィックスの特殊文字を引用するために使用されます。 |
例
上記のコードは、次の結果を生成します-