js小结 数字_四舍五入

js总结 数字_四舍五入//数字 指定位数后 四舍五入function RoundNumber(num, pos){return Math.round(num

js总结 数字_四舍五入

//数字 指定位数后 四舍五入function RoundNumber(num, pos){    return Math.round(num * Math.pow(10, pos))/Math.pow(10, pos);}