In this post i want to explain how to jQuery Show Alert Message while leaving from webpage.
beforeunload:
The beforeunload event is fired when the window, the document and its resources are about to be unloaded.
Let's have look.
Please share your comments and feedback.Thanks.Please subscribe my updates via email.
beforeunload:
The beforeunload event is fired when the window, the document and its resources are about to be unloaded.
Let's have look.
JQuery Function
<script type="text/javascript">
$(function() {
$(window).on('beforeunload', function() {
return '';
});
});
</script>
$(function() {
$(window).on('beforeunload', function() {
return '';
});
});
</script>
very useful code snippet..
ReplyDeletegood work.. :-D
ReplyDelete