Language References
Sets or retrieves the coordinates of a hyperlink AREA within an image MAP.
Inline |
<AREA COORDS = sCoords ... > |
Script |
object.coords = sCoords ] |
sCoords |
String specifying the coordinates. The format of this string is dependent upon the value of the SHAPE attribute of the AREA element. See the Remarks section below. |
The property is read/write with no default value.
The format of the sCoord string is dependent upon the value of the SHAPE attribute as follows:
SHAPE= "circ" or "circle" |
COORDS= "x1,y1,r" – Where x1,y2 are the coordinates of the center of the circle, and r is the radius of the circle. |
SHAPE= "poly" or "polygon" |
COORDS= "x1,y1,x2,y2...xn,yn" – Where each x,y pair contains the coordinates of one vertice of the polygon. |
SHAPE= "rect" or "rectangle" |
COORDS= "x1,y1,x2,y2" – Where x1,y1 are the coordinates of the upper-left corner of the rectangle and x2,y2 are the coordinates of the upper-right coordinates of the rectangle. |
The following example provides the full code for an image map of the solar system. The coords of each AREA link to an individual image.
<img src="imgs/solarsys.gif" width=504 height=126
border=0 alt="Solar System" usemap="#solar">
<map name="solar">
<area shape="rect" coords="0,0,76,122"
href="imgs/sun.gif" alt="Sun">
<area shape="circle" coords="90,61,15"
href="imgs/mercury.gif" alt="Mercury">
<area shape="circle" coords="124,61,18"
href="imgs/venus.gif" alt="Venus">
<area shape="circle" coords="163,61,23"
href="imgs/earth.gif" alt="Earth">
<area shape="circle" coords="201,61,14"
href="imgs/mars.gif" alt="Mars">
<area shape="circle" coords="256,61,40"
href="imgs/jupiter.gif" alt="Jupiter">
<area shape="circle" coords="328,61,35"
href="imgs/saturn.gif" alt="Saturn">
<area shape="circle" coords="392,61,30"
href="imgs/uranus.gif" alt="Uranus">
<area shape="circle" coords="443,61,24"
href="imgs/neptune.gif" alt="Neptune">
<area shape="circle" coords="480,61,13"
href="imgs/pluto.gif" alt="Pluto">
</map>
This feature requires Microsoft® Internet Explorer® 4.0 or later.
Show me
AREA
MAP, shape