Area noHrefPropiedad

Area 对象参考手册Objeto Area

Definición y uso

La propiedad noHref puede establecer o devolver el valor del atributo nohref de un área.

El atributo nohref especifica que un área no tiene un enlace asociado.

Consejo:El atributo nohref informa al navegador de que el atributo de hipervínculo no existe. También puedes omitir el atributo href para establecer más fácilmente que no hay un enlace asociado.

Sintaxis

areaObject.noHref=true|false


Compatibilidad del navegador

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Todos los navegadores principales admiten la propiedad noHref, excepto Internet Explorer.


Ejemplo

Ejemplo

El siguiente ejemplo devuelve la propiedad "noHref" del área "Venus" en el mapa de imagen:

<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>

Resultado del ejemplo anterior:

Value of nohref attribute for the "Venus" area is: true

Pruébalo »


Area 对象参考手册Objeto Area Otras extensiones