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 creates 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;
Syntax
Return the useMap attribute:
objObject.useMap
Set the useMap attribute:
objObject.useMap = #mapname
Attribute value
Value | Description |
---|---|
#mapname | Specifies the hash character (#) followed by the name of the map element to be used. |
Technical details
Return value: | A string value that represents the name of the image map used with the object. |
---|
Browser supports
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Understøtter | Understøtter | Understøtter | Understøtter | Understøtter |
Bemærk:Alle primære browsere understøtter useMap egenskab. Men, <object> elementets useMap egenskab er kun understøttet i Internet Explorer og Firefox.