Image isMap attribute
Definition and usage
isMap
Attribute settings or returns whether the image should be part of the server-side image mapping (the image mapping is an image with clickable areas).
When clicking on the server-side image mapping, the click coordinates will be sent to the server as a URL query string.
This attribute reflects HTML ismap attribute.
Note:The ismap attribute is allowed only when the <img> element is a descendant of an <a> element with a valid href attribute.
Instance
Example 1
Determine if the image is part of the server-side image mapping:
var x = document.getElementById("myImg").isMap;
Example 2
Set the isMap attribute:
document.getElementById("myImg").isMap = true;
Syntax
Return the isMap attribute:
imageObject.isMap
Set the isMap attribute:
imageObject.isMap = true|false
Attribute value
Value | Description |
---|---|
true|false |
Define whether the image should be part of the server-side image mapping.
|
Technical Details
Return Value: | Boolean value, returns true if the image is part of the server-side image map, otherwise returns false. |
---|
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
Related Pages
HTML Reference Manual:HTML <img> ismap Attribute