HTML DOM shape 屬性
定義和用法
shape 屬性可設(shè)置或返回圖像映射中某個(gè)區(qū)域的形狀。
語法
areaObject.shape=RECT|CIRCLE|POLY|DEFAULT
實(shí)例
下面的例子可返回圖像映射中 "Venus" 區(qū)域的形狀:
<html>
<body>
<img src="planets.gif"
width="145" height="126"
usemap="#planetmap" />
<map name="planetmap">
<area id="venus" shape="circle"
coords="124,58,8"
alt="Venus"
href="venus.htm" />
</map>
<p>Venus shape:
<script type="text/javascript">
x=document.getElementById("venus");
document.write(x.shape
);
</script>
</p>
</body>
</html>