Image useMap 属性
实例
例子 1
设置 useMap 属性:
document.getElementById("planets").useMap = "#planetmap";
例子 2
返回图像的 usemap 属性值:
var x = document.getElementById("planets").useMap;
语法
返回 useMap 属性:
imageObject.useMap
设置 useMap 属性:
imageObject.useMap = #mapname
属性值
值 | 描述 |
---|---|
#mapname | Hash character ("#") da sunan ƙarancin map a amfani da. |
Technical details
Return value: | String value, representing the value of the image usemap attribute, including hash characters ("#"). |
---|
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
Related pages
HTML reference manual:HTML <img> usemap attibutu