Window

  • A Window object can represent either a top-level window or a frame inside a frameset.
  • The Window object is the top-level object in the JavaScript client hierarchy.
  • You can use open or close a window.
  • You can control the feature of a window when opening it.
  • You can change the location, status, or other properties of a window/frame.
  • You can scroll the viewing area of a window/frame.
  • You can take actions when a window/frame is loaded/unloaded, or gets/loses focus.
  • You can let the location of a window get backward/forward.
  • A window/frame can access another window/frame.

Reference of a Window

  • Use window name:
    • Frame Name : <frame name="fr1" src="...">
    • Open a new window: window.open("http://...", "win1", "...");
  • parent : the window itself for the top-level window, or the parent frame/window of a frame.
  • top : the top-level window.
  • self : the current winodw.
  • window : the current window