<!DOCTYPE html>
<html>
<body>

<object id="myObject" data="planets.gif" width="145" height="126" usemap="#planetmap"></object>

<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
  <area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
  <area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>

<p><b>Note:</b> The usemap attribute of the object element is only supported in IE and Firefox.</p>

<p>Click the button to display the name of the image-map that is used with the object.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myObject").useMap;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>