![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
09/01/2004, 15:17
|
| | Fecha de Ingreso: octubre-2003 Ubicación: Lima-Peru
Mensajes: 32
Antigüedad: 21 años, 3 meses Puntos: 0 | |
usa este codigo es muy bueno y una vez me ayudo .... alguien me lo facilito en este foro asi q no me quiero llevar su credito:
<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>
Espero q a ti tb te pueda servir... chao |