Hook a javascript event to page load

前端 未结 5 680
感情败类
感情败类 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:48

    Page.ClientScriptManager.RegisterStartupScrip(this.GetType(), "startup", "startClock();", true);
    

    or using prototype

    document.observe("dom:loaded", function() {
      // code here
    });
    

提交回复
热议问题