TOC PREV NEXT INDEX

domref



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

extra information

Specification

parentNode


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX