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

Using onstop

The onstop event occurs when the user clicks the Internet Explorer’s Stop button (which usually makes the browser stop loading a document). You can connect a function to this event like this: document.onstop = handlerFunction, like this: <SCRIPT FOR="document" EVENT="onstop">,or using the ONSTOP event attribute in the <BODY> element, which will pass the event on to the document.

Here’s an example using this event—in this case, I’ll modify Listing 08-08.html, which displayed a clock that updates every second, to stop when the user clicks the Stop button:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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