保留两位小数

num.toFixed(1)

原文地址:https://www.cnblogs.com/jianxingjianyuan/p/7792857.html