when user click a another link or refresh the page, the window will unload, how to prevent/confirm it?
From here http://bytes.com/topic/javascript/insights/825556-using-onbeforeunload-javascript-event
<script type="text/javascript">
window.onbeforeunload = function(){ return 'Your Returned String Goes Here';}
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With