View Full Version : formating numbers for a text box
philip2981
07-31-2002, 07:15 PM
I'm looking to format numbers
XXX,XXX.XX
X.XX
etc.
Help would be wonderful.
Thanks
http://www.codingforums.com/showthread.php?s=&threadid=1907
And more specifically:
Number.prototype.prettyPrint = function() {
return this.toFixed(2).split('').reverse().join('').replace(/(\d{3}(?=\d))/g,'$1,').split('').reverse().join('');
}
philip2981
07-31-2002, 07:27 PM
Thanks
this should help :-D
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.