shape
Area shape 属性
定义和用法
shape 属性可设置或返回某个区域的 shape 属性值。
shape 属性指定了图像映射中某个区域的形状。
语法
		areaObject.shape=value 
	
shape 属性可以是以下值:
| 值 | 描述 | 
|---|---|
| default | 指定整个地区 | 
| rect | 定义了一个矩形区域 | 
| circle | 定义了一个圆形区域 | 
| poly | 定义一个多边形区域 | 
浏览器支持
	![]()
![]()
![]()
![]()
 
所有主要浏览器都支持 shape 属性
实例
下面的例子可返回图像映射中 "Venus" 区域的形状:
		<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>The shape for the "Venus" area is:
<script>
document.write(document.getElementById("venus").shape);
</script>
</p>
</body>
</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>The shape for the "Venus" area is:
<script>
document.write(document.getElementById("venus").shape);
</script>
</p>
</body>
</html>
以上实例输出结果:
		The shape for the "Venus" area is: circle