AvailabilityJavaScript 1.0 Synopsiswindow.close( ) DescriptionThe close( ) method closes the top-level browser window specified by window. A window can close itself by calling self.close( ) or simply close( ). In JavaScript 1.1, only windows opened by JavaScript can be closed by JavaScript. This prevents malicious scripts from causing the user's browser to exit. There is no meaningful way to close a frame within a window. Thus, the close( ) method should be invoked only for Window objects that represent top-level browser windows, not for those that represent frames. See AlsoWindow.open( ), the closed and opener properties of Window |