js数值的格式化函数

xiaoxiao2021-02-28  83

function ForDight(Dight,How){   var Dight = Math.round (Dight*Math.pow(10,How))/Math.pow(10,How);    return Dight;    }  //ForDight(Dight,How):数值格式化函数; //Dight:要格式化的 数字; //How::要保留的小数位数。

转载请注明原文地址: https://www.6miu.com/read-80611.html

最新回复(0)