function addLoadEvent(func){
var oldonload = window.onload;
if (typeof window.onload != 'function'){
window.onload = func;
} else {
window.onload = function(){
oldonload();
func();
}
}
}
function func1(){alert("aaa");}
function func2(){alert("bbb");}
addLoadEvent(func1);
addLoadEvent(func2);
------------------------------
当然jquery也可以实现。