HTMLAreaElement: 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 der HTMLAreaElement-Schnittstelle ist ein String, der angibt, wo die verlinkte Ressource angezeigt werden soll.

Sie spiegelt das target-Attribut des <area>-Elements wider.

Wert

Ein String, der das Ziel darstellt. Der Wert kann sein:

Beispiel

html
<map name="image-map">
  <area href="www.example.com" target="_top" alt="left" />
</map>
js
const areaElement = document.getElementsByName("image-map")[0].areas[0];
console.log(areaElement.target); // Output: "_top"

Spezifikationen

Specification
HTML
# dom-area-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