if(window.attachEvent){
window.attachEvent("onload",uf_attachFunction);
alert("ie");
}
if(window.addEventListener){
alert("ff");
window.addEventListener("load",uf_attachFunction,false);
}
function uf_attachFunction(){
   alert("test");
}
或者
if (document.all){
window.attachEvent('onload',f1())//IE中
}
else{
window.addEventListener('load',f2(),false);//firefox
}

相关文章:

  • 2021-12-02
  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2022-01-07
  • 2022-12-23
  • 2021-06-12
猜你喜欢
  • 2022-01-24
  • 2021-07-12
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
相关资源
相似解决方案