n = "1279834847944074100465236.33";
re = /(\d{1,3})(?=(\d{3})+(?:$|\D))/g ;
n1 = n.replace(re,"$1,");

document.write("Before:" + n + "<br/>After:" + n1);

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.