<!DOCTYPE html>
<html>
<body>
<img id="planets" src="planets.gif" width="145" height="126" usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle" coords="124,58,8" alt="The planet venus" href="venus.htm">
</map>
<p>Click the button to display the value of the usemap attribute of the image.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.getElementById("planets").useMap;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>