HTML DOM isMap 属性

定义和用法

isMap 属性返回图像是否是服务器端图像映射。

语法

imageObject.isMap

实例

下面的例子可检测图像是否是服务器端图像映射:

<html>
<body>

<img id="planets" src=/w3c/jsref/"planets.gif" __width="145" height="126" __usemap="" />
</map>

<p>Is the image a server-side image map?
<script type="text/javascript">
x=document.getElementById('planets');
document.write(x.isMap);
</script>
</p>

</body>
</html>