<td align="center">
<%
String avgnum = "";
if(request.getAttribute("avgnum") != null && !"".equals(request.getAttribute("avgnum"))){
double t = Double.parseDouble((String)request.getAttribute("avgnum"));
java.text.DecimalFormat df = new java.text.DecimalFormat("#.00");
avgnum = df.format(t);
}
%>
<%=avgnum %>
</td>
相关文章
- 06-26EL表达式jsp页面double小数点后保留两位
- 06-26jsp页面中格式化为小数点两位