How to close a window
Closing with javascript
Close the window
Show a message before closing the window
Ask before closing the window