HTML and CSS Reference
In-Depth Information
Figure 13.44 The HTML page before clicking one of three buttons.
Figure 13.45 The user clicked the first button.
In Example 13.27, an image is assigned to the HTML <a> tag. When the user rolls the
mouse over the initial image, the image is replaced with a new image. Rather than have
the onMouseOver and onMouseOut event handlers used as attributes to the HTML link
tag, they will be properties to the link object in the JavaScript code. This allows the pro-
gram to separate the structure (HTML) from the behavior (JavaScript).
 
Search WWH ::




Custom Search