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> <h2>JavaScript Timing</h2> <p>Click "Try it". Wait 3 seconds, and the page will alert "Hello".</p> <button onclick="setTimeout(myFunction, 3000);">Try it</button> <script> function myFunction() { alert('Hello'); } </script> </body> </html>