页面保留两位小数

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xuanzhangran/article/details/71602470
1:引入标签:
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>   
2:使用format转换:
其中money是后台获得的数据
 <fmt:formatNumber type="number" value="${money }" pattern="0.00" maxFractionDigits="2"/>  

猜你喜欢

转载自blog.csdn.net/xuanzhangran/article/details/71602470
今日推荐