JavaScript Reference/Event Handlers Reference/onLoad

Материал из Web эксперт
Перейти к: навигация, поиск

"onLoad" Example

   <source lang="javascript">
   

<html> <body onLoad="alert("The document is fully loaded")"> <img src="http://www.wbex.ru/style/logo.png"> </body> </html>


     </source>
   
  


"onLoad" is applied to

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Applied_To |<applet> <body> | | |<embed> <frame> | | |<frameset> <iframe> | | |<img> <link> | | |<object> <script> | | |window | +----------------+--------------------------------------------------------------+

     </source>
   
  


"onLoad" Properties

   <source lang="javascript">

+----------------+--------------------------------------------------------------+ | Properties |altKey altLeft | | |clientX clientY | | |ctrlLeft offsetX | | |offsetY screenX | | |screenY shiftLeft | | |type x | | |y | +----------------+--------------------------------------------------------------+

     </source>
   
  


"onLoad" Syntax and Note

   <source lang="javascript">

Note:

This event fires immediately after a document, frameset, or image is fully loaded.

     </source>