HomeJavaScript Page 8 - Understanding The JavaScript Event Model (part 2)
Tonight's Menu - JavaScript
In this concluding article on the JavaScript event model, findout how the Event object can be used to do ever more complex things,including manipulating the dimensions of a Web page and tracking andintercepting keyboard and mouse events.
Next, let's look at a couple of examples that demonstrate the possible applications of this capability. This next example sets up a small menu containing multiple links, each link associated with a number. The user can select a specific link by pressing the appropriate number key on the keyboard.
A quick note on something new here: in both cases, the "type" property has been used to identify the type of event generated. This makes it possible to take action selectively, on the basis of the specific type of event generated.