![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
05/12/2003, 19:40
|
![Avatar de Carlitos](http://static.forosdelweb.com/customavatars/avatar4305_1.gif) | Usuario no validado | | Fecha de Ingreso: mayo-2001 Ubicación: Zaragoza
Mensajes: 1.304
Antigüedad: 23 años, 9 meses 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> |