The event object is accessible to all event handlers in all browsers.
The properties of the event object contain additional information about the current event.
To get further details about these properties and the possible event handler registration methods, please see the page for the event object.
This example illustrates the use of the onkeyup event:
var keyCode = ('which'inevent) ? event.which : event.keyCode;
alert ("The Unicode key code of the released key: " + keyCode);
</script></head><body><inputsize="40"value="Write a character into this field!"onkeyup="GetChar (event);"/></body>