7)onload
onload就是等页面加载完后才执行。
例 3.7.1
<HEAD>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<SCRIPT LANGUAGE="JavaScript">
<!--
function a(b)
{
document.write("part 1");
}
//-->
</SCRIPT>
</HEAD>
<BODY onload='a("a","b","c")'>
part2,onload 会在part1和part2打印之后再执行。
</BODY>
文章转载自:https://blog.csdn.net/qq_44594249/article/details/100091795