可以用js实现的哦,先获取页面上的数,比如存储到变量value中,然后var oNum=new Number(value);var formatAfterValue=oNum.toFixed(2);//返回保留小数点后两位的结果~