I want to be able to close the browser window using JavaScript. Is this possible?
Asked
Active
Viewed 875 times
2
-
this site does it: http://www.thewildernessdowntown.com/ – SIr Codealot Sep 04 '10 at 23:15
1 Answers
2
window.close();

hydrogen
- 2,878
- 21
- 20
-
1This is the only way. In modern browsers, it works only if the current window has been opened by a script instance; otherwise, a warning dialog will be shown or nothing will happen at all. – Pekka Sep 04 '10 at 23:19