Ver Mensaje Individual
  #5 (permalink)  
Antiguo 19/05/2006, 11:14
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 3 meses
Puntos: 772
Hola de nuevo.

He modificado el código de mi anterior mensaje, pruebalo a ver si te sirve:
Código:
<html>
<head>
<script type="text/javascript">
var txt, txt2;
var activo= false;
function ini() {
  txt = document.body.innerHTML;
  txt2 = txt.replace(/á/g,'a').replace(/í/g,'i').replace(/ó/g,'o');
  document.body.innerHTML = txt2;
}
function cambia() {
  document.body.innerHTML = (activo) ? txt2 : txt;
  activo = !activo;
}
</script>
</head>
<body onload="ini()">
<p>Esta página tenía acentos</p>
<p>Un camión pasó</p>
<input type="button" value="Cambiar" onclick="cambia()" />
</body>
</html>
Saludos,