JavaScript - YA SE QUE PASA. ME PUEDES AYUDAR?

 
Vista:

YA SE QUE PASA. ME PUEDES AYUDAR?

Publicado por montse (28 intervenciones) el 16/07/2003 22:43:04
Ya se que pasa, claro cuando pulso la tecla que le asigno a acceskey se pone en el link, pero yo quiero simular que hago un click en el link correspondiente. como puedo hacerlo?

Muchas gracias de nuevo
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:YA SE QUE PASA. ME PUEDES AYUDAR?

Publicado por sdg (1 intervención) el 17/07/2003 00:14:31
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var key = new Array();
key['h'] = "pagina.htm";
key['f'] = "pagina2.htm";
key['n'] = "pagina3.htm";
key['s'] = "pagina4.htm";

function getKey(keyStroke) {
isNetscape=(document.layers);

eventChooser = (isNetscape) ? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.location = key[i];
}
document.onkeypress = getKey;
// End -->
</script>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar