Ver Mensaje Individual
  #2 (permalink)  
Antiguo 05/12/2003, 19:40
Avatar de Carlitos
Carlitos
Usuario no validado
 
Fecha de Ingreso: mayo-2001
Ubicación: Zaragoza
Mensajes: 1.304
Antigüedad: 23 años
Puntos: 25
Hola

A ver si te sirve esto:

<script>
var tecla
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
document.onkeydown = keyDown
if (ns4) document.captureEvents(Event.KEYDOWN)
function keyDown(e) {
if (ns4) {
var nKey = e.which
tecla=nKey
}
if (ie4) {
var ieKey = event.keyCode
tecla=ieKey
}
if (tecla==38) {alert('has pulsado tecla arriba'')}
if (tecla==40) {alert('has pulsado tecla abajo'')}
return false
}
</script>