编辑下面的代码:
【加编码】
查看效果 »
<html> <body onbeforeunload="return myFunction()"> <p>关闭当前窗口,按下 F5 或点击以下链接触发 onbeforeunload 事件。</p> <a href="/">点击调整到ziqiangxuetang.com</a> <script> function myFunction() { return "我在这写点东西..."; } </script> </body> </html>
结果:
【此窗口】
帮助?