HTML <area> target 屬性
定義和用法
target
屬性規定打開鏈接文檔的位置。
僅在存在 href 屬性 時使用。
實例
使用 target 屬性指定在圖像映射中打開鏈接文檔的位置:
<map name="planetmap">
<area shape="rect" coords="0,0,114,576" href="sun.html" alt="Sun" target="_blank">
<area shape="circle" coords="190,230,5" href="mercur.html" alt="Mercury">
<area shape="circle" coords="228,230,5" href="venus.html" alt="Venus">
</map>
親自試一試
語法
<area target="_blank|_self|_parent|_top|framename">
屬性值
值 |
描述 |
_blank |
在新窗口或標簽頁中打開被鏈接文檔。 |
_self |
在與點擊相同的框架中打開被鏈接文檔(默認)。 |
_parent |
在整個窗口中打開被鏈接文檔。 |
_top |
在整個窗口中打開被鏈接文檔。 |
framename |
在指定的 iframe 中打開鏈接文檔。 |
瀏覽器支持
Chrome |
Edge |
Firefox |
Safari |
Opera |
Chrome |
Edge |
Firefox |
Safari |
Opera |
支持 |
支持 |
支持 |
支持 |
支持 |