js中保留2位小数点

var a = 7;

var b = 3;

var c = (a/b).toFixed(2);

C即是有2位小数点的数字; 

猜你喜欢

转载自halfsking.iteye.com/blog/2330036