<html> <head> <title>打开页面就执行JS</title> <script language="JavaScript" type="text/javascript"> alert("打开页面就执行的代码!"); </script> <script language="JavaScript" type="text/javascript"> function window_onload() { alert("页面加载完毕后才执行的代码!"); } </script> </head> <body > </body> </html>
时间: 2024-10-18 22:51:19