编辑下面的代码:【加编码】
<html> <head> <script> function myFunction() { alert("Thank you for visiting W3Schools!"); } </script> </head> <body onunload="myFunction()"> <h1>Welcome to my Home Page</h1> <p>Close this window or press F5 to reload the page.</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂