onload

  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>