If a page contains frames, each frame has its own window object and is stored in the frames collection. Within the frames collection, the window objects are indexed both by number and by the name of the frame.
The top object always points to the very top(outermost) frame, which is the browser window itself. Any code written within a frame that references the window object is pointing to that frame‘s unique instance rather than the topmost one.
Another window object is called parent. The parent object always points to the current frame‘s immediate parent frame.
时间: 2024-10-09 17:54:09