<!DOCTYPE html>
<head>
<title>Whatever</title>
<script>
function whatever() {
alert("Got it!");
}
</script>
</head>
<body onhashchange="whatever()">
</body>
</html>
onbeforeunload will get called if you close the browser or change the URL entirely, navigating away. So far I can only get this to work in IE, not Google Chrome.
No comments:
Post a Comment