I am trying to figure out what values are returned when keys are
pressed in Mozilla & IE. Here's the code I'm using. There are no
alerts in either browser. Any clues would be greatly appreciated.
Thanks. KK
<html>
<head><title>Re ading Keystrokes</title>
<script language="JavaS cript">
window.onkeyDow n = keyHit;
function keyHit(evt) {
if (evt && evt.which) { //NS
thisKey = evt.which;
}
else if(window.event && window.event.ke yCode) { //IE
thisKey=window. event.keyCode;
}
alert(thisKey)
}
</script>
</head><body></body></html>
pressed in Mozilla & IE. Here's the code I'm using. There are no
alerts in either browser. Any clues would be greatly appreciated.
Thanks. KK
<html>
<head><title>Re ading Keystrokes</title>
<script language="JavaS cript">
window.onkeyDow n = keyHit;
function keyHit(evt) {
if (evt && evt.which) { //NS
thisKey = evt.which;
}
else if(window.event && window.event.ke yCode) { //IE
thisKey=window. event.keyCode;
}
alert(thisKey)
}
</script>
</head><body></body></html>
Comment