|
關(guān)鍵字: javascript
function ForDight(Dight,How)
{
var Dight = Math.round(Dight*Math.pow(10,How))/Math.pow(10,How);
return Dight;
}
Dight: 需要進(jìn)行四舍五入運(yùn)算的數(shù)字 How: 四舍五入到小數(shù)點(diǎn)后的位數(shù) |
|
|