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 that has clickable areas.

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

See Also:

HTML Reference Manual:Tanda <map> HTML

HTML Reference Manual:Tanda <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 Specify the hash character (#) followed by the name of the map element to be used.

Technical Details

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

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Disebabkan Disebabkan Disebabkan Disebabkan Disebabkan

Komen:Semua pelayar utama mendukung properti useMap. Namun, properti usemap elemen <object> hanya disokong di Internet Explorer dan Firefox.