Ver Mensaje Individual
  #10 (permalink)  
Antiguo 02/02/2007, 09:19
Avatar de bookmaster
bookmaster
 
Fecha de Ingreso: febrero-2002
Ubicación: Toledo
Mensajes: 976
Antigüedad: 22 años, 3 meses
Puntos: 67
Re: buscador interno 2

Weno entre los 2 creo que hemos resuelto el tema:

Te dejo el codigo que funciona y suena:
Código PHP:
<html
<
head
<
script language="javascript" type="text/javascript"
function 
buscar() { 
    var 
insulto 'tonto'
    var 
texto document.body.innerHTML
    var 
patron = new RegExp('('+insulto+')','gi'); 
    
textoNuevo texto.replace(patron,'<span style="background:yellow">$1</span>'); 
    
document.body.innerHTML textoNuevo
    if ( 
texto!=textoNuevo ) { 
        
Reproducir();
    }; 
};

function 
Reproducir(){ 
// alert("Reproduciendo");
    
document.getElementById("Sonido").innerHTML="<embed src='x.wav' loop='false' hidden='true'></embed>";
//  document.all.sound.src = "x.wav";
};


</script> 
</head> 
<body onload="buscar()"> 
<div id="Sonido" style="left:0; top:0; position:absolute; visibility:hidden;"></div>
<p>Este código es un poco tonto</p> 
<p>Pero más tonto hubiera sido no intentarlo</p> 
</body> 
</html> 
Espero te sirva
__________________
Decir si te a funcionado la respuesta es ¡GRATIS!. Por favor indicarlo.
http://www.lohacemosweb.net
http://tutoriales.lohacemosweb.net