Ver Mensaje Individual
  #3 (permalink)  
Antiguo 12/07/2002, 16:46
jhor1976
 
Fecha de Ingreso: julio-2002
Mensajes: 4
Antigüedad: 21 años, 11 meses
Puntos: 0
Re: Capturar un enter

Gracias por tu colaboracion, aqui te pongo un codigo que funciona para el netscape
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">


document.captureEvents(Event.KEYPRESS);
document.onkeypress=pasar;
function pasar(e) {
var keyChar =e.which;
if (keyChar=="13"){
alert ('Presiono enter');
document.forma.cuadro2.focus();

}
}


</SCRIPT>


</head>
<body>
<form name=forma action="prueba.html">
<input type="text" name="cuadro1" >
<input type="text" name="cuadro2">
<input type="submit" name="enviar">
</form>


</body>
</html>

Espero que tambien te sirva