+ 2
You can use Javascript onbeforeunload() event attribute. When unload event fires, it shows a prompt asking whether user wants to leave or reload the page. window.onbeforeunload = function(e) { return "Do you want to exit this page?"; };
1st Oct 2017, 7:32 AM
Ankit Agrawal
Ankit Agrawal - avatar