`

JS四舍五入

 
阅读更多
//四舍五入
function roundNumber(number,fractionDigits){  
  with(Math){  
    return round(number*pow(10,fractionDigits))/pow(10,fractionDigits);  
  }  
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics