var number_format = function(number, n){
n = n ? parseInt(n) : 8;
if (n <= 0) return Math.round(number);
number = Math.round(number * Math.pow(10, n)) / Math.pow(10, n);
return number;
}
number_format(1.201000) //1.201
var number_format = function(number, n){
n = n ? parseInt(n) : 8;
if (n <= 0) return Math.round(number);
number = Math.round(number * Math.pow(10, n)) / Math.pow(10, n);
return number;
}
number_format(1.201000) //1.201