Tutorial Put Comma Values in Numbers

This function assumes what is being submitted to it is a string, with a decimal point and two places after the decimal. To get your number i...

This function assumes what is being submitted to it is a string, with a decimal point and two places after the decimal. To get your number into that format first, use this.
Then this function will properly comma separate the number. For example, 2345643.00 will return 2,345,643.00
function CommaFormatted(amount) {
var delimiter = ","; // replace comma if desired
var a = amount.split('.',2)

Hot in Week

Popular

Archive

item