... fare una replace:

codice:
var str="Ciao a tutti!";
str=str.replace(/o/g,'a'); // cambiamo tutte le o in a
Ciao !