HTML DOM useMap 屬性
定義和用法
useMap 屬性可設(shè)置或返回圖像的 usemap 屬性的值。
語法
imageObject.useMap=URL
實例
下面的例子可輸出客戶端圖像映射的 usemap 屬性的值:
<html>
<body>
<img id="planets" src="planets.gif"
width="145" height="126"
usemap="#planetmap" />
<map name="planetmap">
<area id="venus" shape="circle"
coords="124,58,8"
alt="The planet Venus"
href="venus.htm" />
</map>
<p>The value of the usemap attribute=
<script type="text/javascript">
x=document.getElementById('planets');
document.write(x.useMap
);
</script>
</p>
</body>
</html>