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

Chapter 32. DOM-2 Events and Event Handlers > Events in Internet Explorer

Events in Internet Explorer

The good news is Internet Explorer supports the original HTML event handlers as event handlers. The bad news is even with Internet Explorer 6, there is no attempt to use the DOM-2 Events model, aside from many of the specific event types being similar. The current event becomes a property of the window object, named window.event.

Microsoft includes an alternative extension to the <script>...</script> element for event handling. The for attribute reflects an element's id attribute somewhere in the document, and the event attribute is the event handler, including the on prefix, on which the script acts. (For the record, this sort of event handling takes place after the document has loaded; forget about using this for the onload event handler.)


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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