• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Working with the Mouse, Keyb... > Using the IE4+ event Object

Using the IE4+ event Object

Unlike the Netscape Navigator 4.0 event model, where events move down to their intended target from the top of the object hierarchy, events in the Internet Explorer move up from their target in a process called bubbling.

Here’s an example that shows how bubbling works. In this case, I’ll attach event handlers to the button, form, body, <HTML>, and document objects to handle onclick events. When you click the button in this example, you’ll see alert boxes showing how the event is bubbling up the object hierarchy, from the button all the way up to the document object. Here’s the code:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint