addLoadEvent

 function addLoadEvent(func){
        var oldOnload = window.onload;
        if(typeof(window.onload) != 'function'){
            window.onload = func;
        }else{
            window.onload = function(){
                oldOnload();
                func();
            };
        };
    };

  

posted @ 2014-11-24 10:58  Joerias  阅读(143)  评论(0编辑  收藏  举报