SetTimeout and call a function - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window setTimeout


SetTimeout and call a function

Demo Code

ResultView the demo in separate window

      <title>Wake up call</title> 
      <script type="text/javascript">
        function wakeUpCall() { // Function is defined here
            setTimeout('aa("ok");', 5000);
        }//w w  w. ja  v a 2  s  .c  o m
        function aa(bb) {
   <body bgcolor="lightblue"> 
         <input type="button" value="Wake me" onclick="wakeUpCall()"> 

Related Tutorials