查找区域的 href
- <html>
- <head>
- <script type="text/javascript">
- function changeLink()
- {
- document.getElementById('venus').href="http://www.yousite.com"
- }
- </script>
- </head>
- <body>
- <p>请点击金星(Venus):</p>
- <img src="/i/eg_planets.jpg"
- usemap="#planetmap" />
- <map name="planetmap">
- <area
- id="venus"
- shape="circle"
- coords="180,139,14"
- href ="/example/html/venus.html"
- alt="Venus" />
- </map>
- <input type="button" onclick="changeLink()" value="改变链接" />
- </body>
- </html>