//num表示要四舍五入的数,v表示要保留的小数位数。
function decimal(num,v)
{
var vv = Math.pow(10,v);
return Math.round(num*vv)/vv;
}
转载于:https://www.cnblogs.com/Denny_Yang/archive/2011/04/08/2008900.html
转载于:https://www.cnblogs.com/Denny_Yang/archive/2011/04/08/2008900.html