1<script>
2 var showedAlert = false;
3 function handleUnload()
4 {
5 if (showedAlert)
6 return;
7
8 showedAlert = true;
9 alert("Now Quit Safari. Do not dismiss this alert first.");
10 }
11</script>
12<body onunload="handleUnload()">
13 Close this window
14</body>
15