Frame.top

JavaScript 1.0+, JScript 1.0+ Nav2+, IE 3+, Opera3+ Syntax

							frame.top

Description

The top property of the Frame object specifies the top-most browser window containing frames.

Example

Listing 7.286 shows an example of how the top property is used to get the name of the top frame.

Listing 7.286 Example of top Property
<script language="JavaScript">
<!-- Hide

var topBrowserName = myframe.document.top.name;
alert("The name of the top most browser is: " + topBrowser);
// End Hide --->
</script>
							
						

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.