Hi All,
Is there any way to find the event is browser back button click?
I need to show an alert when user clicks on browser back button? I tried using the following code but alert is showing for every event on this page.
Is there any way to find the event is browser back button click?
I need to show an alert when user clicks on browser back button? I tried using the following code but alert is showing for every event on this page.
Code:
window.onbeforeunload = function(evt) { if (typeof evt == 'undefined') evt = window.event; if(evt) { return "If you leave this page, your information will not be updated."; } }
Comment