Ver Mensaje Individual
  #4 (permalink)  
Antiguo 17/06/2011, 16:15
Avatar de Naahuel
Naahuel
 
Fecha de Ingreso: marzo-2011
Ubicación: localhost
Mensajes: 796
Antigüedad: 13 años, 7 meses
Puntos: 192
Respuesta: Ejecutar Acción onblur...

¿Así? :s
Código HTML:
Ver original
  1. <!DOCTYPE html>
  2. <script type="text/javascript">
  3. function b(){
  4.     document.getElementById("txt").focus();
  5. }
  6.  
  7. function test(_inp){
  8.    if(_inp.value=="hola"){b();}
  9. }
  10.  
  11. </head>
  12. <body onload="b()">
  13.   <p><input id="txt" onblur="test(this)" /></p>
  14.   <p><input onblur="test(this)" /></p>
  15. </body>
  16. </html>

Fijate que si escribís hola en el primero, no te deja darle foco al segundo.
__________________
nahueljose.com.ar