HTML area nohref 屬性
實例
帶有可點擊區域的圖像映射,並使用nohref 屬性:
<img src="planets.gif"
width="145" height="126"
alt="Planets"
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" nohref alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" nohref alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus">
</map>
嘗試一下»
瀏覽器支持
目前所有主流瀏覽器都不支持nohref 屬性。
定義和用法
HTML5中<area>標籤不再支持nohref屬性。
nohref 屬性是一個boolean(布爾) 屬性。
該屬性指定一個區域沒有關聯鏈接。
提示: nohref屬性指明<area>標籤沒有關聯鏈接。 更簡單的方式是不使用href 屬性。
HTML 和XHTML 之間的差異
在XHTML 中,屬性最小化是被禁止的, nohref 屬性必須定義為<area nohref="nohref" />。
語法
<area nohref>