Calling to Display the Alert Dialog onLoad : HTML Body Event « HTML « JavaScript DHTML






Calling to Display the Alert Dialog onLoad


<html>
<head>
  <title>Dialog from onLoad</title>
  <script type="text/javascript">
  <!--
    function opendoc(){
      alert("Dialog called ")
    } -->
  </script>
</head>
<body onload="opendoc()">
  <b>
    Test page of onLoad JavaScript call
  </b>
</body>
</html>


           
       








Related examples in the same category

1.Using the fireEvent() Method
2. onBlur and onFocus Event Handlers
3.Using the onSelectStart Event Handler
4.Calling to Display the Alert Dialog Directly
5.JavaScript Event Handlers :Loading/ Unloading a Document
6.Handling Load Events in a Content Document
7.Using Event Bubbling with the onClick Event
8. Running a Script from the onLoad Event Handler
9.Using addBehavior() and removeBehavior()