HTML DOM Map-objekt

Map object

The Map object represents the HTML <map> element.

Access Map object

You can access the <map> element using getElementById():

var x = document.getElementById("myMap");

Try it yourself

Create Map object

You can create a <map> element using the document.createElement() method:

var x = document.createElement("MAP");

Try it yourself

Collection of Map objects

Set Beskrivning
areas Return the set of all <area> elements within the image-map.
images Return the set of all <img> and <object> elements associated with the image-map.

Map-objektets egenskaper

egenskaper Beskrivning
name Ställ in eller returnera namn-egenskapsvärdet för image-map.

Standardegenskaper och händelser

Map-objektet stöder standarderegenskaperochHändelser.

Relaterade sidor

HTML referenshandbok:HTML <map>-tagget

HTML referenshandbok:HTML <area>-tagget