THE WORLD'S LARGEST WEB DEVELOPER SITE

Object useMap Property

❮ Object Object

Example

Get the name of the image-map that is used with the object:

var x = document.getElementById("myObject").useMap;
Try it Yourself »

Definition and Usage

The useMap property sets or returns the value of the usemap attribute of an <object> element.

The usemap attribute specifies the name of an image-map to use with the object.

An image-map is an image with clickable areas.

The usemap attribute is associated with a <map> element's name attribute, and creates a relationship between the object and the map.


Browser Support

Property
useMap Yes Yes Yes Yes Yes

Note: The useMap property is supported in all major browsers. However, the usemap attribute of the <object> element is only supported in Internet Explorer and Firefox.


Syntax

Return the useMap property:

objObject.useMap

Set the useMap property:

objObject.useMap = #mapname

Property Values

Value Description
#mapname Specifies a hash character ("#") plus the name of the map element to use

Technical Details

Return Value: A String, representing the name of the image-map that is used with the object

Related Pages

HTML reference: HTML <object> usemap attribute

HTML reference: HTML <map> tag


❮ Object Object