HTML DOM MapObject
Map Object
The Map object represents an HTML <map> element.
Access a Map Object
You can access a <map> element by using getElementById():
var x = document.getElementById("myMap");
Try it Yourself
Create a Map Object
You can create a <map> element by using the document.createElement() method:
var x = document.createElement("MAP");
Try it Yourself
Map Object Collections
| Collection | Description |
|---|---|
| areas | Returns a collection of all <area> elements in an image-map. |
| images | Returns a collection of all <img> and <object> elements associated with the image map. |
Map Object Properties
| Properties | Description |
|---|---|
| name | Sets or returns the value of the name attribute of an image map. |
Standard Properties and Events
Map Object also supports the standardPropertiesandEvents。
Related Pages
HTML DOM Reference:Area Object
HTML Reference:HTML <map> Tag
HTML Reference:HTML <area> Tag
Other Extensions