HTML DOM noHref 属性
定义和用法
noHref 属性可设置或返回某个区域是活动的还是非活动的。
语法
areaObject.noHref=true|false
说明
<area> 标签的 nohref 属性在客户端图像映射中定义了一个对鼠标敏感的区域,而该区域不会在用户选取它时采取任何操作。你必须为每个 <area> 标签都包含一个 href 或 nohref 属性。
实例
下面的例子可返回图像映射中 "Venus" 区域的 "noHref" 状态:
<html>
<body>
<img src=/w3c/jsref/"planets.gif" __width="145" height="126" __usemap="" />
</map>
<p>noHref status:
<script type="text/javascript">
x=document.getElementById('venus');
document.write(x.noHref
);
</script>
</p>
</script>
</body>
</html>