Javascript Reference
Categories: Node

javascript Node parentNode

@March 15, 2008, 1:22 a.m.
parentNodeFirefox/Netscape/NN 6 IE 5 Chrome/Safari/DOM 1  

Read-only  

Returns a reference to the next outermost node (usually an element) that acts as a container to the current node in the document tree. The relationship between the current node and its parent is purely structural, and is not concerned with positioning context. A parent node is one that completely encases the current nodenot to be confused with sibling nodes, which, at best, reside on just one side of the current node. You can use the same cascading tricks as shown for the IE parentElement property, but it is hazardous to completely equate results from the element-centric IE-only properties with results from the W3C DOM node-centric properties (even though recent IE versions support both views of the world).

 
Example
 
if (document.getElementById("elementID").parentNode.nodeType == 1) {
    document.getElementById("elementID").parentNode.style.fontSize = "14pt";
}
 
Value

Element object reference.

 
Default

Node-specific.

atorvastatin order online <a href="https://lipiws.top/">atorvastatin 80mg cheap</a> lipitor 40mg brand
Qqdxgi - 10 months

Powered by Linode.