Window.top Property---the window of a frame
Navigator 2.0, Internet Explorer 3.0
window.top
The top property is a read-only reference to the Window object that is the top-level window that contains window. If window is a top-level window itself, then the top property simply contains a reference to window. If window is a frame, then the top property contains a reference to the top-level window that contains the frame. Note that the top property refers to a top-level window even if window refers to a frame contained within another frame (which may itself be contained within a frame, and so on). Compare this with the Window.parent property.
Certain operations, such as setting the status and defaultStatus properties only are useful when performed on a top-level window. When JavaScript code running in a frame needs to operate on its top-level window, it can use the top property. For example, it could display a message in the message line as follows:
top.defaultStatus = 'Welcome to my Home Page!';
file: /Techref/language/java/script/definitive/refp_463.htm, 5KB, , updated: 2019/10/14 15:00, local time: 2024/11/8 10:18,
3.145.76.40:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://linistepper.com/Techref/language/java/script/definitive/refp_463.htm"> [Chapter 21] Reference: Window.top</A> |
Did you find what you needed? |