parentNode
Returns the parent of the current node.
Syntax
node = element.parentNode
Parameters
Example
As you can see from the following not very interesting example, even simple HTML documents can contain a complex hierarchy of parents and children. In this case, the document object is a parent of the HTML object, which is a parent of the BODY object, which in turn is a parent of the H1 object being examined.
Notes
Note that this property returns NULL for the document itself, but can be used on the children of the document to refer back to the document or other intermediate parents (see example above).
Specification
parentNode
Netscape Communications http://developer.netscape.com |