一个类似vbscript的round函数的javascript函数

作者:袖梨 2022-06-30
同vbscript的Round函数功能相同,四舍五入保留指定小数位数
function Round(a_Num , a_Bit)
{
return( Math.round(a_Num * Math.pow (10 , a_Bit)) / Math.pow(10 , a_Bit)) ;
}

相关文章

精彩推荐