執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,亮/暗
前往 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>