parentNode
The parentNode property returns the parent of the current element.
Syntax
pElement = element.parentNode
Parameters
pElement is the element parent of the current node.
Example
text_field = document.getElementById("t"); if ( div1.parentNode == document ){ text_field.setAttribute("value", "top-level"); // textfield displays text "top-level" }
Notes
Specification
Netscape Communications http://developer.netscape.com |