risultato = string.replace(/\./g,"").replace(/\,/,"\.")

ciao