parentElement property

calendar March 28, 2010

Value: Element object reference or null

Compatibility: WinIE4+, MacIE4+, Moz-, Safari-

The parentElement property returns a reference to the next outermost HTML element from the current element. This parent-child relationship of elements is often, but not always, the same as parent-child node relationship. The difference is that the parentElement property deals only with HTML elements as reflected as document objects, whereas a node is not necessarily an HTML element (an attribute or text chunk).

There is also a distinction between parentElement and offsetParent properties. The latter returns an element that may be many generations removed from a given element but is the immediate parent with regard to positioning context. For example, a td element’s parentElement property is its enclosing tr element, but a td element’s offsetParent property is its table element.

Related Items: ossetParent, parentNode properties.

admin

One Response to “parentElement property”

  1. RONALD Says:


    Medicamentspot.com. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. High quality pills. Buy drugs online

    Buy:Human Growth Hormone.Valtrex.Actos.Mega Hoodia.Zovirax.Arimidex.Lumigan.Retin-A.Prevacid.Prednisolone.Synthroid.100% Pure Okinawan Coral Calcium.Petcam (Metacam) Oral Suspension.Zyban.Nexium.Accutane….

Leave a Reply

You must be logged in to post a comment.