HTMLMapElement

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.

HTMLMapElement 接口提供特定的属性和方法(除了常规 HTMLElement 接口之外,它还可以通过继承来使用),用于操作 map 元素的布局和展现。

EventTarget Node Element HTMLElement HTMLMapElement

实例属性

从其父接口 HTMLElement 继承属性。

HTMLMapElement.name

一个表示 <map> 元素的字符串,用于在其他上下文中引用它。如果设置了 id 属性,则该属性必须具有相同的值;且它不能为 null 或者空。

HTMLMapElement.areas 只读

一个动态的 HTMLCollection,表示与 <map> 关联的 <area> 元素。

实例方法

无特定方法;从其父接口 HTMLElement 继承方法。

规范

Specification
HTML
# htmlmapelement

浏览器兼容性

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
HTMLMapElement
areas
name

Legend

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

Full support
Full support

参见

  • 实现该接口的 HTML 元素:<map>