REEMPLAZAR CARACTERES CON JAVASCRIPT
function replaceAll(text, busca, reemplaza)
{
if (text === undefined) {
//txt = "x is undefined";
return "";
} else {
//txt = "x is defined";
while (text.toString().indexOf(busca) != -1)
text = text.toString().replace(busca,reemplaza);
return text;
}
}
function replaceAll(text, busca, reemplaza)
{
if (text === undefined) {
//txt = "x is undefined";
return "";
} else {
//txt = "x is defined";
while (text.toString().indexOf(busca) != -1)
text = text.toString().replace(busca,reemplaza);
return text;
}
}
Comentarios
Publicar un comentario