The parentNode Property


The parentNode Property

The parentNode property returns the parent node of the present node. Unlike the parentElement property (see the previous topic), you can use this property with any W3C node, not just with elements. You can see the support for this property in Table 5.44.

Table 5.44. The parentNode Property

Property

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

parentNode

     

x

     

x

x

x

 

Read-only

 

Type: Node object

Here's an example:

 var parentNode = document.getElementById("node1").parentNode 


Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net