Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

frameElement

The frameElement of the Window object returns reference to the iframe or object that the document is embedded in.

Syntaxwindow.frameElement
doc1.html <iframe id="iframe1" src="doc2.html"></iframe> doc2.html <script> document.write( window.frameElement.id ); </script> <h2>Framed Content</h2>

If testing in Google Chrome browser, run your test online to see it work.

JavaScript

Properties

bodycalleeclosedcookiedocumentdropEffecteffectAllowedfilesframeElementframeshistoryInfinityinnerHeightinnerHTMLinnerWidthlengthlocationlocationbarnameNaNnavigatornullopenerouterHeightparentprototypescreenstatetextContentundefined