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 GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
name |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Siehe auch
HTMLImageElement.useMap
-EigenschaftHTMLAreaElement
-Element