The Anchor.x property yields the pixel distance of the anchor from the left edge of the document. The horizontal position of the object in the display is measured in pixels. You can use the x and y coordinates of the object as targets of the scrollTo() method for the window it lives in.
This is not supported by MSIE. Instead you can use the offsetLeft property that is inherited from the Element object super-class. There may be some occasions when this is not an exact equivalent value though.
See also: | Anchor object, Element.offsetLeft, Location.x |
Prev | Home | Next |
Anchor.urn | Up | Anchor.y |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |