tags:

views:

39

answers:

1

I want to be able to close the browser window using JavaScript. Is this possible?

+1  A: 
window.close();
hydrogen
This 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
In a frame, use top.close().
Zafer