before_unload.html 215 B

12345678910
  1. <html>
  2. <body onbeforeunload="return runBeforeUnload()">
  3. <p>Some text so the document is ready for input.</p>
  4. </body>
  5. <script>
  6. function runBeforeUnload() {
  7. return "foo";
  8. }
  9. </script>
  10. </html>