How to set timer on body onload?

后端 未结 3 1984
旧时难觅i
旧时难觅i 2021-01-27 06:18

I want to set timer on body onload eventHandler to call function where I show hide div.


    
3条回答
  •  别那么骄傲
    2021-01-27 06:39

    Use jquery, it less..

      function foo() {
        // method show should be called.
        $("#idDiv").show();
      }
    
      function bar() {
        setTimeout(foo(), 1000)
      }
    
    
    
     
    
     
    

提交回复
热议问题