Answers for "how to apply commas in currency from jquery"

0

countTo add commas to number jquery

Number(10000).toLocaleString('en');  // "10,000"
Posted by: Guest on March-30-2021
0

jquery thousand separator

function addCommas(nStr) {
    nStr += '';
    var x = nStr.split('.');
    var x1 = x[0];
    var x2 = x.length > 1 ? '.' + x[1] : '';
    var rgx = /(d+)(d{3})/;
    while (rgx.test(x1)) {
        x1 = x1.replace(rgx, '$1' + ',' + '$2');
    }
    return x1 + x2;
}
Posted by: Guest on April-18-2021

Code answers related to "how to apply commas in currency from jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language