Area hostname 属性

定义和用法
hostname 属性可设置或返回 href 属性值得主机名部分。
语法
areaObject.hostname=hostname
浏览器支持
所有主要浏览器都支持 hostname 属性
实例
下面的例子可返回图像映射中 "Venus" 区域的主机名:
<img src="/examples/planets.gif" 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>Venus 区域的主机名称: <script> document.write(document.getElementById('venus').hostname); </script> </p>
