NS4 = (Document.Layers)? True: false;
IE4 = (Document.all)? TRUE: FALSE;
Function KeyDown (e) {
IF (ns4) {
VAR NKEY = E.WHICH;
Var iekey = 'is now NS browser';
Var RealKey = String.Fromcharcode (E.WHICH);
}
IF (IE4) {
Var iekey = event.Keycode;
Var nkey = 'is now IE browser';
Var Realkey = String.Fromcharcode (Event.Keycode);
IF (Event.Keycode == 32) {realkey = '/' space / ''}
IF (event.keycode == 13) {realkey = '/' Enter / ''}
IF (Event.Keycode == 27) {realkey = '/' esc / ''}
IF (event.keycode == 16) {realkey = '/' shift / ''}
IF (event.keycode == 17) {realkey = '/' ctrl / ''}
IF (event.keycode == 18) {realkey = '/' alt / ''}
}
Alert ('ns browser key value:' nkey '/ n' 'IE browser key value:' IEKEY '/ N' 'The actual key is' realkey);
}
Document.onkeydown = keydown;
IF (ns4) {
Document.captureEvents (Event.KeyDown);
script>
hEAD>
// javascript document.
center>
body>
html>