HTMLMapElement: name-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 name-Eigenschaft des HTMLMapElement stellt den eindeutigen Namen des <map>-Elements dar. Ihr Wert kann mit dem useMap-Attribut des <img>-Elements verwendet werden, um auf ein <map>-Element zu verweisen.

Wenn ein id-Attribut auf dem <map>-Element gesetzt ist, sollte diese name-Eigenschaft mit dieser id identisch sein.

Wert

Ein nicht-leerer String ohne Leerzeichen.

Beispiel

html
<map name="image-map">
  <area shape="circle" coords="15,15,5" />
</map>
js
const mapElement = document.getElementsByName("image-map")[0];
console.log(mapElement.name); // output: "image-map"

Spezifikationen

Specification
HTML
# dom-map-name

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
name

Legend

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

Full support
Full support

Siehe auch