源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> </head> <body> <img src="/images/logo.png" width="145" height="126" usemap="#planetmap"> <map name="planetmap"> <area id="venus" shape="circle" coords="124,58,8" alt="Venus" href="venus.htm"> </map> <p>金星區域的 hostname:port: <script> document.write(document.getElementById('venus').host); </script> </p> <p><b>注意:</b>如果沒有指定端口部分的URL,或者是80(默認),一些瀏覽器將不會顯示端口的部分。</p> </body> </html>
運行結果