






















js中可以使用Math.round实现整数的四舍五入,如果需要实现精确到小数点多少位则需要编写函数了。
function ForDight(Dight,How) {
Dight = Math.round(Dight*Math.pow(10,How))/Math.pow(10,How);
return Dight;
}
本文转载自<这一技客> http://www.geekso.com/
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。