HTMLAnchorElement: target プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

targetHTMLAnchorElement インターフェイスのプロパティで、リンク先のリソースを表示する場所を示す文字列です。

これは <a> 要素の target 属性を反映します。

対象とするものを表す文字列。その値は次のいずれかになります。

html
<a href="www.example1.com" class="link1" target="_blank">example1</a>
js
const link = document.querySelector(".link1");
console.log(link.target); // output: "_blank"

仕様書

Specification
HTML
# dom-a-target

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
target

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報