Murach's JavaScript and DOM Scripting
Advanced event handling

Throughout this book, you have been using basic techniques to handle simple events like the click event of a button. In this chapter, you'll learn how to handle a wide range of mouse and keyboard events...and to do that as easily as possible...by using the browser-compatible code in JavaScript libraries.

Chapter 14 Advanced event handling
An introduction to event handling 470
An overview of event handling 470
An overview of XHTML event types 472
An overview of mouse event types 474
An overview of keyboard event types 474
How to use our JavaScript libraries 476
How to attach and remove event handlers 476
How to use the standardized Event object 478
The Slide Show application 480
The XHTML file 480
The slide_show_library.js file 482
The slide_show.js file 484
The core event models 486
How to access the Event object 486
The properties and methods of the Event object 488
The methods for attaching and detaching event handlers 490
Browser-compatible code for attaching and detaching event handlers 492
The jslib_event.js file 494
The mouse event models 500
The properties of the Event object 500
The sequence of events for a mouse click 502
The jslib_event_mouse.js file 504
The keyboard event models 506
The DOM Level 3 properties and methods for the Event object 506
The properties of the Event object that are implemented by the major browsers 508
The key codes for keyboard events 510
The jslib_event_keyboard.js file 514




Murach's JavaScript and DOM Scripting

Learn more about this book

View the table of contents


More about the eBook



Our 100% Guarantee

First, try our books for 90 days. Then, if you aren't completely convinced that our books are the best ones you've ever used, you can return them for a prompt refund...no questions asked.