frameElement

HTML (DHTML)

frameElement Property

Internet Development Index

Retrieves the frame or iframe object that is hosting the window in the parent document.

Syntax

[ oWinFrame = ] window.frameElement

Possible Values

oWinFrame Object that receives the frame or iframe.

The property is read-only. The property has no default value.

Remarks

The window must be a frame or iframe.

Example

The following example retrieves the frame element of the window and sets its source URL to Microsoft Developer Network (MSDN) Online.

<SCRIPT LANGUAGE="JScript">
var oFrame = window.frameElement;
oFrame.src = "http://msdn.microsoft.com";
</SCRIPT>

Standards Information

There is no public standard that applies to this property.

Applies To

window