javascript - How to ask confirmation when closing a window? -


I want to pop up a message to confirm, if the user wants to leave the current page, just like Stackoverflow does what you are typing a question.

Can someone redirect me to a script or to a reply (on this site or elsewhere)?

Thank you

You handle window event and a confirmation message in the form of a string Need to return

will be on not work here


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -