The Element objects are instantiated as the HTML tags are parsed within the document source. They are added to several collections and can be navigated in a variety of ways.
Each Element object has an array of Element objects that are considered to be its direct descendants (that is children). This collection will not contain its children's children. The first element in this collection can be referred to by index and its siblings by means of an enumerator or for( ... in ... ) loop. However you can access it directly with this property.
If the element has no children, then this property will contain a null value.
Prev | Home | Next |
Element.filters[] | Up | Element.getAdjacentText() |
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. |