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


同vbscript的Round函数功能相同,四舍五入保留指定小数位数
   function Round(a_Num , a_Bit)
    {
      return( Math.round(a_Num * Math.pow (10 , a_Bit)) / Math.pow(10 , a_Bit))  ;
    }   本文作者:
« 
» 
快速导航

Copyright © 2016 phpStudy | 豫ICP备2021030365号-3