August 1999
Intermediate to advanced
1488 pages
72h 53m
English
Event.KEYDOWN
The KEYDOWN property of the Event object is used by documents, images, links, and text area for elements to indicate when a key is pressed by the user.
Listing 7.225 shows an example of how a JavaScript function can use the KEYDOWN event to determine if a key was pressed down. When the KEYDOWN event is captured, the handle() function processes the event and informs the user that a key has been pressed down.
<html> <head> <title>Example of Event.KEYDOWN</title> </head> <body> <script language="JavaScript"> <!--Hide // sets up the window to capture KEYDOWN events window.captureEvents(Event.KEYDOWN); // function that ... |
Read now
Unlock full access