#1
|
|||
|
|||
JavaScript Image Maps
An image-map is an image with clickable regions.
HTML Image Maps From our HTML tutorial we have learned that an image-map is an image with clickable regions. Normally, each region has an associated hyperlink. Clicking on one of the regions takes you to the associated link. Adding some JavaScript We can add events (that can call a JavaScript) to the tags inside the image map. The tag supports the onClick, onDblClick, onMouseDown, onMouseUp, onMouseOver, onMouseMove, onMouseOut, onKeyPress, onKeyDown, onKeyUp, onFocus, and onBlur events. Here's the HTML image-map example, with some JavaScript added: Example alt="Planets" usemap="#planetmap" /> |