quit-inside-unload.html 293 B

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