Ver Mensaje Individual
  #2 (permalink)  
Antiguo 09/08/2008, 15:18
Avatar de leac3
leac3
 
Fecha de Ingreso: abril-2007
Ubicación: Valencia, pero mi mente y corazon estan en San Francisco.
Mensajes: 147
Antigüedad: 17 años, 1 mes
Puntos: 4
Respuesta: Problema detectando ENTER en FF3

Problema resuelto, aqui el codigo, comprobado en IE7, FF3, Opera 9.27 y Safari 3.1.2:

Cita:
<head>
function darle_enter(e)
{
var keynum

if(window.event) // IE
{
keynum = e.keyCode
}
else // Netscape/Firefox/Opera
{
keynum = e.which
}

if (keynum==13){
alert("eso fue un ENTER");

}
}
</head>
<body>
<input type="text" onkeypress="return darle_enter(event)" />
</body>