← 返回首页
HTMLMapElement: name プロパティ - Web API | MDN

このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。

View in English Always switch to English

HTMLMapElement: name プロパティ

Baseline Widely available

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

nameHTMLMapElement インターフェイスのプロパティで、<map> 要素の一意な名前を表します。 この値は <img> 要素の useMap 属性と一緒に使うことで、<map> 要素を参照することができます。

<map> 要素に id 属性が設定されている場合、この name プロパティはこの id と同じになります。

In this article

ホワイトスペースのない、空でない文字列です。

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); // 出力: "image-map"

仕様書

Specification
HTML
# dom-map-name

ブラウザーの互換性

Enable JavaScript to view this browser compatibility table.

関連情報