代码示例:(标识:dhtm_event_onload)
<html>
<head>

<script type="text/javascript">
function mymessage()
{
alert("该消息被 onload 事件触发")
}
</script>
</head>

<body onload="mymessage()">
</body>

</html>
运行结果: