This can be invaluable when you're trying to track down an error. Other methods let you open and close new windows or change their appearance. We'll show how to use these methods when we deal with windows and frames. It allows you to executed a piece of JavaScript code after a set time interval. The syntax of the code to be executed follows the same rules as that used in an event handler.
Any code following the call is executed immediately.
Also, the statement given to it is executed only once. Frame Objects Frames are represented using Window objects. When a page contains a frameset, the main window object will contain an array called frames with one Window object for each frame in the set. From within a given frame, you can refer to the containing window using window.parent or just parent. For a nested frameset, you could use window.parent.parent to refer to the top-level window.