HTMLAnchorElement: target-Eigenschaft

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.

Die target-Eigenschaft des HTMLAnchorElement-Interfaces ist eine Zeichenkette, die angibt, wo die verlinkte Ressource angezeigt werden soll.

Sie reflektiert das target-Attribut des <a>-Elements.

Wert

Eine Zeichenkette, die das Ziel darstellt. Ihr Wert kann sein:

Beispiel

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

Spezifikationen

Specification
HTML
# dom-a-target

Browser-Kompatibilität

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

Siehe auch