Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body onunload="myFunction()"> <h1>Welcome to my Home Page</h1> <p>Close this window or press F5 to reload the page.</p> <p><strong>Note:</strong> Due to different browser settings, this event may not always work as expected.</p> <script> function myFunction() { alert("Thank you for visiting W3Schools!"); } </script> </body> </html>