Ver Mensaje Individual
  #4 (permalink)  
Antiguo 12/07/2002, 17:05
Avatar de .
.
 
Fecha de Ingreso: mayo-2002
Ubicación: Tampico
Mensajes: 906
Antigüedad: 22 años, 1 mes
Puntos: 1
Re: Capturar un enter

hola tu ejemplo tiene por ahi una fallita.
Pero hice compatible el anterior,

<form name=forma>
<input type=text name=a onkeypress="tecla=event.keyCode; teclans=tecla.which; if (tecla==13){document.forma.b.focus()}; if (teclans==13){document.forma.b.focus()}">& lt;br>
<input type=text name=b onkeypress="tecla=event.keyCode; teclans=tecla.which; if (tecla==13){document.forma.c.focus()}; if (teclans==13){document.forma.c.focus()}">& lt;br>
<input type=text name=c onkeypress="tecla=event.keyCode; teclans=tecla.which; if (tecla==13){document.forma.d.focus()}; if (teclans==13){document.forma.d.focus()}">& lt;br>
<input type=text name=d>
</form>


de esta forma puedes tener varios campos sin tener que hacer una funcion para cada campo