I want to use onbeforeunload to give a message to users before leaving certain pages. Is it possible to know which url they are supposed to jump to at the onbeforeunload event?
Thanks
I want to use onbeforeunload to give a message to users before leaving certain pages. Is it possible to know which url they are supposed to jump to at the onbeforeunload event?
Thanks
Is it possible to know which url they are supposed to jump to at the onbeforeunload event?
No, definitely not. The onbeforeunload
event tells you only that the page is about to be unloaded, but not why.