Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML DOM Map object


May 06, 2021 JavaScript with HTML DOM Reference book


Table of contents


HTML DOM Map object


Map object

The Map object represents the HTML-lt;map-gt; element.

Access the Map object

You can use getElementById() to access the element:

var x = document.getElementById("myMap"); Give it a try

Create a Map object

You can create the element by using the document.createElement() method:

var x = document.createElement("MAP"); Give it a try

Map object collection

Collection Describe
areas Returns a collection of all the elements in the image map
images Returns a collection of all the elements associated with the image map

Map objects are familiar

Property Describe
name Set or return the name property value of the image map

Standard properties and events

Map objects also support standard properties and events.


Related pages

HTML DOM Reference Manual: Area Object

HTML Reference Manual: HTML slt;map> Tags

HTML Reference Manual: HTML slt;area.gt; Tags