I have this code in javascript below:
function ExitPage(){return 'Wait!';}
<body onbeforeunload="return ExitPage();">
I would like to run some codes when the user clicks on the "cancel" button. How will I accomplish this?
Any suggestion would be greatly appreciated.
Thanks