執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>The script defer attribute</h1> <script src="demo_defer.js" defer></script> <p>The script above requests information from the paragraph below. Normally, this is not possible, because the script is executed before the paragraph exists.</p> <p id="p1">Hello World!</p> <p>However, the defer attribute specifies that the script should be executed later. This way the script can request information from the paragraph.</p> </body> </html>