tip and trick‎ > ‎

Don't Leave this page !!!!!

posted Apr 12, 2012, 6:09 AM by mb s
COnfirm Navigation

to  create this confirm VIA jquery ,write this code :

<title>Refresh a page in jQuery</title>
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
<h1>Stop a page from exit with jQuery</h1>
<button id="reload">Refresh a Page in jQuery</button>
<script type="text/javascript">
	$('#reload').click(function() {
	$(window).bind('beforeunload', function(){
		return '>>>>>Before You Go<<<<<<<< \n Your custom message go here';

View Sample Online