<!DOCTYPE html>
<html>
<body>
<img src ="planets.gif" width="145" height="126" alt="行星"usemap ="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="太阳">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="水星">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="金星">
</map>
<p>
<a href="/html/default.asp">HTML</a><br>
<a href="/css/default.asp">CSS</a>
</p>
<p>单击该按钮可显示文档中每个链接的 URL。</p>
<button type="button" onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
var x = document.links;
var txt = "";
var i;
for (i = 0; i < x.length; i++) {
txt = txt + x[i].href + "<br>";
}
document.getElementById("demo").innerHTML = txt;
}
</script>
</body>
</html>