x
<html>
<head>
<script>
function beforeFunc(){
alert("Example #2 says: 'You are leavng this page!!'");
}
function retFunc(){
alert("Example #2 says: 'You closed the page...Hope you have read all the content of this page carefully.'");
}
</script>
</head>
<body id="main" onbeforeunload="beforeFunc()" onunload="retFunc()">
<p>Try reloading or closing the browser...</p>
</body>
</html>
Comments
No comments have been made yet.
Please login to leave a comment. Login now