<!DOCTYPE html>
<html>
<body>
<img src="/i/html/planets.jpg" width="215" height="260" usemap="#planetmap">
<map name="planetmap">
<area id="venus" target="_blank" shape="circle" coords="180,139,14" alt="Venus" href="http://www.example.com:80/test.html">
</map>
<p>单击该按钮可更改图像映射中 “venus” 区域的 href 属性的端口号。</p>
<p><b>提示:</b>请打开“金星”区域,在您点击“试一试”按钮前后查看地址栏(新建的示例链接只是演示,不会生效)。</p>
<button onclick="myFunction()">试一试</button>
<p id="demo"></p>
<script>
function myFunction() {
document.getElementById("venus").port = "443";
document.getElementById("demo").innerHTML = "端口号已从 “80” 更改为 “443”。";
}
</script>
</body>
</html>