Javascript Reference
Categories: Element

javascript Element parentElement

@March 15, 2008, 1:22 a.m.
parentElement NN n/a IE 4 DOM n/a  

Read-only  

Returns a reference to the next outermost element in the HTML containment hierarchy. An element's HTML parent is not necessarily the same as the object returned by the offsetParent property. The parentElement concerns itself strictly with source code containment, while the offsetParent property looks to the next outermost element that is used as the coordinate system for measuring the location of the current element. For example, if the main document contains a p element with an em element nested inside, the em element has two parents. The p element is the returned parentElement value (due to the HTML source code containment), while the body element is the returned offsetParent value (due to coordinate space containment).

You can jump multiple parent levels by cascading parentElement properties, as in:

document.getElementById("elementID").parentElement.parentElement;

You can then use references to access a parent element's properties or methods.

The corresponding property for the W3C DOM is parentNode.

 
Example
 
document.getElementById("elementID").parentElement.style.fontSize = "14pt";
 
Value

Element object reference.

 
Default

Element-specific.

order generic lipitor 80mg <a href="https://lipiws.top/">lipitor 10mg drug</a> order lipitor 40mg generic
Tfyelj - 1 months
lipitor 10mg cheap <a href="https://lipiws.top/">atorvastatin 80mg uk</a> lipitor 40mg uk
Obrutl - 1 months
Захвату.NET - держите руку на пульсе жизни Рунета

Портал «Захвату.нет» - это крайне нестандартный сетевой проект, создатели которого приняли решение отказаться от формата стандартного новостного портала и сделали уклон в сторону общественного блога, где размещаются не обсосанные сверху до низу сторон новости с крупных централизованных агрегаторов, а авторские публикации на самые злободневные темы, которые смешиваются с простыми новостями.

При этом новостные обзоры не просто говорят о каком-то произошедшем событии, а разносторонне анализируют его, с точки зрения различных специалистов.

На ресурсе есть огромное число разделов, благодаря чему <a href=https://zaxvatu.net/>https://zaxvatu.net/</a> будет полезен пользователям сети с разнообразными интересами: начиная от врачей, заканчивая представителями чисто технических специальностей.
Fernayzlak - 2017-08-31

Powered by Linode.