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

Chapter 9. Handling Events > Understanding Events

Understanding Events

In simplest terms, an event is something that happens to an object. For example, the loading of a page would be an event for the Window object. Don't confuse a method with an event, however. Yes, the Window object has (for example) a history.back() method that loads the previous page in the history list, but this method only initiates the procedure of loading the page; the actual process of the page being loaded is the event. Note, too, that events can happen in two ways:

  • They can happen programmatically by including the appropriate method in your code, such as history.back().

  • They can happen by user intervention, such as the user clicking the browser's Back button.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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