TOC PREV NEXT INDEX

Put your logo here!


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

link to DOM spec here


mozilla.org | mailto:oeschger | bug 93108
TOC PREV NEXT INDEX