Area noHrefProperty
Area Object
Definition and Usage
The noHref property sets or returns the value of the nohref attribute of an area.
The nohref attribute specifies that an area has no associated link.
Tip:The nohref attribute informs the browser that the hyperlink attribute does not exist. You can also simply set no associated link by not using the href attribute.
Syntax
areaObject.noHref=true|false
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the noHref property except Internet Explorer.
Example
Example
The following example returns the "noHref" attribute of the "Venus" area in the image map:
<html>
<body>
<img src="planets.gif.html"
width="145" height="126"
usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle"
coords="124,58,8"
alt="Venus"
href="venus.htm.html"
nohref="nohref.html">
</map>
<p>Value of nohref attribute for the "Venus" area is:
<script>
document.write(document.getElementById("venus").noHref);
</script>
</p>
</body>
</html>
<body>
<img src="planets.gif.html"
width="145" height="126"
usemap="#planetmap">
<map name="planetmap">
<area id="venus" shape="circle"
coords="124,58,8"
alt="Venus"
href="venus.htm.html"
nohref="nohref.html">
</map>
<p>Value of nohref attribute for the "Venus" area is:
<script>
document.write(document.getElementById("venus").noHref);
</script>
</p>
</body>
</html>
The above example outputs:
Value of nohref attribute for the "Venus" area is: true
Try it yourself »
Area Object Other Extensions