Easy Tutorial
❮ Met Canvas Arc Jsref Negative Infinity ❯

Frame/IFrame contentDocument Property


Definition and Usage

The contentDocument property returns the document contained within the frame as an HTML object.

The returned object can be manipulated with all standard DOM methods.

Note: Due to security reasons, the content of the document can only be accessed by another document from the same domain.

Syntax


Browser Support

All major browsers support the contentDocument property.

Note: If a !DOCTYPE is specified, Internet Explorer 8 and later versions support the contentDocument property. For other IE versions, use the contentWindow property.


Example

An example demonstrating how to change the background color of a document within an iframe:

❮ Met Canvas Arc Jsref Negative Infinity ❯