As replace() creates/returns a new string rather than modifying the original (tt), you need to set the variable (tt) equal to the new string returned from the replace function.
tt = tt.replace(/,/g, '.')
JSFiddle
As replace() creates/returns a new string rather than modifying the original (tt), you need to set the variable (tt) equal to the new string returned from the replace function.
tt = tt.replace(/,/g, '.')
JSFiddle