Object useMap attribute

Definition and usage

useMap Attribute that 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 associated with the <map> element name attribute Associate and create a relationship between the object and the map.

See also:

HTML Reference Manual:Etichetta <map> HTML

HTML Reference Manual:Etichetta <object> HTML

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 Specifies 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
Supporto Supporto Supporto Supporto Supporto

Nota:Tutti i principali browser supportano l'attributo useMap. Tuttavia, l'attributo usemap dell'elemento <object> è supportato solo in Internet Explorer e Firefox.