onload - 页面加载后onload - 页面加载后<!DOCTYPE html><html><head><script>function myFunction() { alert("页面已加载");}</script></head> <body onload="myFunction()"><h2>Hello World!</h2></body> </html>