案例:HTML DOM案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
4
<script type="text/javascript">
5
function mymessage()
6
{
7
alert("该消息被 onload 事件触发")
8
}
9
</script>
10
</head>
11
12
<body onload="mymessage()">
13
</body>
14
15
</html>
16