content property (window)
Returns a reference to the topmost ancestor window object in the window hierarchy.
The older version of this property is the window._content property, but it is deprecated. For a cross-browser solution, use the top property.
Note that because of security restrictions, the contents of a document can be accessed from another document only if the two documents are located in the same domain.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Reference to the topmost window object.
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the top property. See the contents of the frameChain.htm and the subFrame.htm files too. You can use the content property instead of the top property in Firefox.
Did you find this example helpful?
User Contributed Comments