エリアターゲットプロパティ
例
イメージマップの特定の領域のターゲットを変更します。
document.getElementById("venus").target = "_blank";
定義と使用法
targetプロパティは、エリアのtarget属性の値を設定または返します。
target属性は、リンクされたドキュメントを開く場所を指定します。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
target | Yes | Yes | Yes | Yes | Yes |
構文
ターゲットプロパティを返します。
areaObject.target
ターゲットプロパティを設定します。
areaObject.target = "_blank|_self|_parent|_top|framename"
Value | Description |
---|---|
_blank | Open the linked document in a new window |
_self | Open the linked document in the same frame as it was clicked (this is default) |
_parent | Open the linked document in the parent frameset |
_top | Open the linked document in the full body of the window |
framename | Open the linked document in a named frame |
技術的な詳細
戻り値: | リンクされたドキュメントを開く場所を表す文字列 |
---|
その他の例
例
イメージマップ内の特定の領域のターゲットを取得します。
var x =
document.getElementById("venus").target;
関連ページ
HTMLリファレンス:HTML <area>ターゲット属性
❮エリアオブジェクト