Ask user to confirm whether to close the window or not on click of close ?

Posted by Puneet20884 under JavaScript category on | Views : 3396
Following code can let us catch this event

< body onbeforeunload="return confirm('Close ?');">

Its a simple snippet, you can even manage other activities on this events as per requirement !!

Comments or Responses

Login to post response