Object useMap attribute

Definition and usage

useMap Attribute sets or returns the <object> element usemap attribute value.

The usemap attribute specifies the name of the image map used with the object.

An image map is an image with clickable areas.

The usemap attribute is related to the <map> element name attribute Associated and create a relationship between the object and the map.

See also:

HTML Reference Manual:HTML <map>-Tag

HTML Reference Manual:HTML <object>-Tag

Example

Get the name of the image map used with the object:

var x = document.getElementById("myObject").useMap;

Try it yourself

Syntax

Return the useMap attribute:

objObject.useMap

Set the useMap attribute:

objObject.useMap = #mapname

Attribute value

Value Description
#mapname Specify the hash character (#) followed by the name of the map element to be used.

Technical details

Return value: String value indicating the name of the image map used with the object.

Browser support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Unterstützt Unterstützt Unterstützt Unterstützt Unterstützt

Anmerkung:Alle主要浏览器 unterstützen das useMap-Attribut. Allerdings wird das useMap-Attribut des <object>-Elements nur in Internet Explorer und Firefox unterstützt.