How can I make a JavaScript alert before a page closes?
- by Nuha
I want to write JavaScript code that would, when I close the current HTML page, display an alert message like "Are you sure?"
I want to take the value of the button from the alert message, whatever the user pressed. How can I do this?