Archive for April, 2010

parentNode Property

Value: Node object reference or null

Compatibility: WinIE5+, MacIE5+, Moz1+, Safari1+

The parentNode property returns a reference to the next outermost node that is reflected as an object belonging to the document. For a standard element object, the parentNode property is the same as IE’s parentElement because both objects happen to have a direct parent-node relationship as well as a parent-child element relationship.

Other kinds of content , however can be nodes. This includes text fragments within an element. A text fragment’s parentNode property is the next outermost node or element that encompasses that fragment. A text node object in IE does not have a parentElement property.

Related Items: childNodes, nodeName, nodeType, nodeValue, parentElement properties.