<html>
<head>
<title>AAAAAAAAAAAAAAAAAAAAA </title>
<style type = "text/css">
.highlight {color:red}
</style>
<script type = "text/javascript">
function showBrowserType()
{
document.getElementById("readout").innerHTML =
"Your Broser" +
"<span class = 'highlight'>" +
navigator.userAgent + "</span>.<hr />";
}
window.onload = showBrowserType;
</script>
</head>
<body>
<hl>asdasdasd</hl>
<hr>
<hl>asdasdasd</hl>
<hr />
<div id = "readout"></div>
</body>
</html>
onload事件只有在HTML文本和图像已经到达浏览器后才会触发
看来 前置知识 是HTML