1. 程式人生 > >jsp中使用el表示式和jstl函式輸出格式化數字

jsp中使用el表示式和jstl函式輸出格式化數字

1.jsp中引入lib包

<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

2.el表示式呼叫格式化函式

<fmt:formatNumber type="number" value="${score}" maxFractionDigits="0"/>

效果 如:
66