function ForDight(Dight, How) {
Dight = Math.round(Dight * Math.pow(10, How)) / Math.pow(10, How);
return Dight;
}
console.log(ForDight(10.45935,2));
转载于:https://my.oschina.net/suyunfei/blog/652497
function ForDight(Dight, How) {
Dight = Math.round(Dight * Math.pow(10, How)) / Math.pow(10, How);
return Dight;
}
console.log(ForDight(10.45935,2));
转载于:https://my.oschina.net/suyunfei/blog/652497