R
Robert Mark Bram
Hi All,
This page:
http://www.lookuptables.com/
shows that the decimal ASCII code for 'A' is 65 and 'a' is 97.
Yet I find that the following code in Firefox and IE show 65 for a and
A.
<html>
<head>
<script type="text/javascript">
function keyPressed(event) {
if (event == null) {
event = window.event;
}
var keycode;
if (window.event) {
keycode = window.event.keyCode;
} else if (event) {
keycode = event.which;
}
alert(keycode);
}
</script>
</head>
<body>
<form>
<input type="text" onkeyup="keyPressed(event);"/>
</form>
</body>
</html>
Why is this?
Rob

This page:
http://www.lookuptables.com/
shows that the decimal ASCII code for 'A' is 65 and 'a' is 97.
Yet I find that the following code in Firefox and IE show 65 for a and
A.
<html>
<head>
<script type="text/javascript">
function keyPressed(event) {
if (event == null) {
event = window.event;
}
var keycode;
if (window.event) {
keycode = window.event.keyCode;
} else if (event) {
keycode = event.which;
}
alert(keycode);
}
</script>
</head>
<body>
<form>
<input type="text" onkeyup="keyPressed(event);"/>
</form>
</body>
</html>
Why is this?
Rob