查找图像映射区域的备用文本
- <html>
- <body>
- <img src="/i/eg_planets.jpg"
- usemap="#planetmap" />
- <map name="planetmap">
- <area id="venus" shape="circle"
- coords="180,139,14"
- alt="The planet Venus"
- href="/example/hdom/venus.html" />
- </map>
- <p>"Venus" 的替代文本是:
- <script type="text/javascript">
- x=document.getElementById('venus');
- document.write(x.alt);
- </script>
- </p>
- </body>
- </html>