查找区域的坐标

  1. <html>
  2. <body>
  3.  
  4. <img src="/i/eg_planets.jpg"
  5. usemap="#planetmap" />
  6.  
  7. <map name="planetmap">
  8. <area id="venus" shape="circle"
  9. coords="180,139,14"
  10. alt="Venus"
  11. href="/example/hdom/venus.html" />
  12. </map>
  13.  
  14. <p>Venus 的坐标(coords 属性)是:
  15. <script type="text/javascript">
  16. x=document.getElementById("venus");
  17. document.write(x.coords);
  18. </script>
  19. </p>
  20.  
  21. </body>
  22. </html>