Add multiple [removed] events

前端 未结 8 1834
说谎
说谎 2020-12-02 10:31

In my ASP.NET User Control I\'m adding some JavaScript to the window.onload event:

if (!Page.ClientScript.IsStartupScriptRegistered(this.GetType         


        
8条回答
  •  情书的邮戳
    2020-12-02 11:15

    Mootools is another great JavaScript framework which is fairly easy to use, and like RedWolves said with jQuery you can can just keep chucking as many handlers as you want.

    For every *.js file I include I just wrap the code in a function.

    window.addEvent('domready', function(){
        alert('Just put all your code here');
    });
    

    And there are also advantages of using domready instead of onload

提交回复
热议问题