Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/01/2007, 04:19
Avatar de JavierB
JavierB
Colaborador
 
Fecha de Ingreso: febrero-2002
Ubicación: Madrid
Mensajes: 25.052
Antigüedad: 22 años, 2 meses
Puntos: 772
Re: buscador interno

Hola FlingeR. Bienvenido al foro.

Prueba este código, no tiene sonido, pero algo es algo:

Código PHP:
<html>
<
head>
<
script type="text/javascript">
function 
buscar() {
  
insulto 'tonto';
  
texto document.body.innerHTML;
  
patron = new RegExp('('+insulto+')','gi');
  
texto texto.replace(patron,'<span style="background:yellow">$1</span>');
  
document.body.innerHTML texto;
}
</script>
</head>
<body onload="buscar()">
<p>Este código es un poco tonto</p>
<p>Pero más tonto hubiera sido no intentarlo</p>
</body>
</html> 
Saludos,