Hook a javascript event to page load

前端 未结 5 675
感情败类
感情败类 2020-12-03 10:02

I have an aspx that has the following javascript function being ran during the onload event of the body.


5条回答
  •  离开以前
    2020-12-03 10:39

    window.addEventListener("load", function() {
        startClock();
    }
    

    This will invoke the startClock function at page load.

提交回复
热议问题