标签:
<SCRIPT TYPE="TEXT/JAVASCRIPT"> //<![CDATA[ Number.prototype.toFixedOf = function (n){ if(!n || typeof n != "number" || n > 12) return NaN; var reck = 1; for (var i=0; i<n; i++) reck *= 10; return parseInt(this * reck)/reck; } var num = 3223.987654321234567890123456789 alert( num.toFixedOf(5) ); //]]> </SCRIPT>
标签:
原文地址:http://www.cnblogs.com/jweb/p/4612789.html