Jstl <fmt:formatNumber> Tags

Source: Internet
Author: User

Labels are used to format numbers, percentages, and currencies.

    • If the type attribute is a percentage or a number, you can use more than one number format property. The Maxintegerdigits and Minintegerdigits properties allow you to specify the size of the non-fractional portion of a number. If the actual number exceeds maxintegerdigits, the number is truncated.
    • Properties are also provided to allow you to determine how many decimal digits should be used. The Minfractionaldigits and Maxfractionaldigits properties allow you to specify the number of decimal digits. If the number exceeds the maximum number of decimal digits, the number is rounded.
    • Grouping can be used to insert commas between thousands of groups. Specify the grouping by setting the Groupingisused property to True or false. When using grouping with minintegerdigits, you must be careful to obtain the expected results.
    • You can choose to use the Pattern property. This property allows you to include special characters that specify your numbering encoding. The following table lists the code:

# # example # #
Files: fmt_formatnumber.jsp-

 <ul class= "List-group list-group-unbordered" > <li class= "List-group-item" > &L t;b> account balance </b> <a class= "pull-right" >¥<fmt:formatnumber value= "${rpaccount.availablebalance}"                  Pattern= "0.00"/></a> </li> <li class= "List-group-item" > <b> settled balances </b> <a class= "pull-right" >¥<fmt:formatnumber value= "${rpaccount.availablesettamount                  } "pattern=" 0.00 "/></a> </li> <li class=" List-group-item "> <b> Frozen amount </b> <a class= "pull-right" >¥<fmt:formatnumber value= "${rpaccount.unbalance}" pattern= " 0.00 "/></a> </li> <li class=" List-group-item "> <b& gt; today's earnings </b> <a class= "pull-right" >¥<fmt:formatnumber value= "${rpaccount.todayincome}" pattern= "0.00    "/></a> </li>            <li class= "List-group-item" > <b> today's expenses </b> <a class= "Pull-right" >¥<f Mt:formatnumber value= "${rpaccount.todayexpend}" pattern= "0.00"/></a> </li> & Lt;/ul>

Jstl <fmt:formatNumber> Tags

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.