Javascript Reference
Categories: IFRAME

javascript IFRAME contentDocument

@March 25, 2009, 3:36 a.m.
contentDocument Firefox/Netscape/NN 6 IE n/a Chrome/Safari/DOM 2  
  Read-only  

Returns a reference to the document object loaded into the iframe element object. Through that document object, you can access one of the document's elements via the getElementById( ) method, or access the containing window object via the document's defaultView property. For IE/Windows, use the contentWindow property to jump from iframe element object to its content.

 
Example
 
var iframeElem = parent.document.getElementById("myIframe");
var doc = iframeElem.contentDocument;
 
Value

Reference to a document node.

 
Default

Current document node.


Powered by Linode.