Code:
<html>
<head>
<script type="text/javascript">
function writeText(txt)
{
document.getElementById("desc").innerHTML=txt;
}
</script>
</head>
<body>
<img src="Byke.gif" width="70" height="115"
alt="Planets" usemap="#Bykemap" />
<map name="Bykemap">
<area shape ="rect" coords ="0,0,60,100"
onMouseOver="writeText('Harley Davidson')"
href ="harley.htm" target ="_blank" alt="Harley" />
<area shape ="circle" coords ="70,40,3"
onMouseOver="writeText('V-Twin Engine')"
href ="vtwin.htm" target ="_blank" alt="Engine" />
<area shape ="circle" coords ="99,30,4"
onMouseOver="writeText('Willy G. Davidson')"
href ="Willy.htm" target ="_blank" alt="Willy" />
</map>
<p id="desc"></p>
</body>
</html>
The above code is what I used for scripting an HTML page with JavaScript when I was given an assignment. I used the Harley Davidson byke as the image for my Image Map.
Bookmarks