Set the useMap property:
The useMap property sets or returns the value of the usemap attribute of an image.
The usemap attribute specifies an image as a client-side image-map (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 image and the map.
The useMap property is supported in all major browsers.
Return the useMap property:
Set the useMap property:
Value | Description |
---|---|
#mapname | A hash character ("#") plus the name of the map element to use |
Return Value: | A String, representing the value of the usemap attribute of the image, including the hash character ("#") |
---|
Return the value of the usemap attribute of an image:
The result of x will be:
HTML reference: HTML <img> usemap attribute