Sets or retrieves the coordinates of the object. What's New for Microsoft® Internet Explorer 6
This property now applies to the
a object.
dhtml语法 HTML | <ELEMENT COORDS
= sCoords... >
|
---|
Scripting | object.coords [ = sCoords ] |
---|
DHTML可能的值 sCoords | String that
specifies or receives the coordinates. |
The property is read/write.
The property has no default value. Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
remarks for a objects, you must set the value of this property before you can retrieve it. this satisfies the requirements of world wide web consortium (w3c) document object model (dom) level 1 . the page author is responsible for implementing the functionality defined in html 4.0 for a objects, if desired. for area objects, the format of sCoords
depends on the value of the SHAPE attribute of the object, 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 vertex 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 lower-right coordinates of the rectangle. |
DHTML代码范例
This example provides the full code for an image map of the solar system. Clicking on the sun or any planet links to an individual image. The user can click the Back button from the image to return to the solar system image map. <P><IMG SRC="solarsys.gif" WIDTH=504 HEIGHT=126 BORDER=0
ALT="Solar System" USEMAP="#SystemMap">
<MAP NAME="SystemMap">
<AREA SHAPE="rect" COORDS="0,0,82,126"
href="../common/sun.gif">
<AREA SHAPE="circle" COORDS="90,58,3"
href="../common/merglobe.gif">
<AREA SHAPE="circle" COORDS="124,58,8"
href="../common/venglobe.gif">
<AREA SHAPE="circle" COORDS="162,58,10"
href="../common/earglobe.gif">
<AREA SHAPE="circle" COORDS="203,58,8"
href="../common/marglobe.gif">
<AREA SHAPE="poly"
COORDS="221,34,238,37,257,32,278,44,284,60,281,75,
288,91,267,87,253,89,237,81,229,64,228,54"
href="../common/jupglobe.gif">
<AREA SHAPE="poly"
COORDS="288,19,316,39,330,37,348,47,351,66,349,74,
367,105,337,85,324,85,307,77,303,60,307,50"
href="../common/satglobe.gif">
<AREA SHAPE="poly"
COORDS="405,39,408,50,411,57,410,71,404,78,393,80,
383,86,381,75,376,69,376,56,380,48,393,44"
href="../common/uraglobe.gif">
<AREA SHAPE="poly"
COORDS="445,38,434,49,431,53,427,62,430,72,435,77,
445,92,456,77,463,72,463,62,462,53,455,47"
href="../common/nepglobe.gif">
<AREA SHAPE="circle" COORDS="479,66,3"
href="../common/pluglobe.gif">
</MAP>
是否符合公共标准
This property is defined in
HTML 4.0 and
is defined in
W3C DOM Level 1 .
Applies To
|