HTML and CSS Reference
In-Depth Information
Figure 13.13 Spring image (top), summer image (middle), and fall image (bottom)
are all part of the slideshow created in Example 13.11.
13.5 Handling Link Events
In many of the previous examples, links have been used to trigger events. When the user
clicked or moved the mouse over a link, a link event was triggered. One link event,
onClick , gets sent whenever someone clicks on a link. As we saw with mouse events,
onMouseOver and onMouseOut also cause a link event to occur. The link events are listed
in Table 13.5.
Table 13.5 Link Events
Event Handler
When It Is Triggered
onClick
When the mouse is clicked on a link
onMouseOut
When a mouse is moved out of a link
onMouseOver
When a mouse is moved over a link
13.5.1 JavaScript URLs
We have seen JavaScript code in a JavaScript: URL throughout this text. In the example
using mouse events, the event handler was assigned to a link and the link was deacti-
vated by assigning a quoted hash mark to the link href attribute:
 
 
 
Search WWH ::




Custom Search