标签:
if (typeof window.addEventListener != "undefined") { window.addEventListener("load",rollover); } else { window.attachEvent("onload",rollover) } function rollover(){ alert("ok"); }
javascript:判断支持哪种监听
原文地址:http://www.cnblogs.com/tinyphp/p/4846271.html