Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/12/2008, 18:30
albertcito
 
Fecha de Ingreso: diciembre-2007
Mensajes: 169
Antigüedad: 16 años, 5 meses
Puntos: 6
Pregunta Funcion getFocus()

Hola he buscado y buscado pero sin resultado, algo así el codigo:

Código HTML:
<script>
var x = document.getElementById("mi_input");
if(x.getFocus()) alert("Estan escribiendo en el input");
else alert("El input no tiene el foco actualmente");
</script>
....

<input type="text" id="mi_input"> 
osea alguna función que me diga si el foco lo tiene un determinado input del cual yo tengo de antemano el id.

Gracias :D