function percentNum(num, num2) { return (Math.round(num / num2 * 10000) / 100.00 + "%"); } alert(percentNum(1,2));
var a=5.27777777777; alert(a.toFixed(2));
标签:fixed mat style class round 百分比 var 函数 gpo
function percentNum(num, num2) { return (Math.round(num / num2 * 10000) / 100.00 + "%"); } alert(percentNum(1,2));
var a=5.27777777777; alert(a.toFixed(2));
标签:fixed mat style class round 百分比 var 函数 gpo
原文地址:https://www.cnblogs.com/5aiQ/p/8446105.html