x
 
<!DOCTYPE html>
<html>
<body>
<h1>演示如何访问 AREA 元素</h1>
<img src="/i/html/planets.jpg" border="0" usemap="#planetmap" />
<map name="planetmap" id="planetmap">
<area
id="myArea"
shape="circle"
coords="180,139,14"
href ="/demo/tags/venus.html"
target ="_blank"
alt="Venus" />
</map>
<p>单击按钮可获取该区域的 URL。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
  var x = document.getElementById("myArea").href;
  document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>