function addLoadEvent(func){
var oldοnlοad=window.onload;
if(typeof window.onload!='function'){
window.οnlοad=func;
}else{
window.οnlοad=function(){
oldonload();
func();
}
}
}
以后只要写上addLoadEvent(firstFunction);addLoadEvent(secondFunction);就可以调用函数队列firstFunction和secondFunction了