代码如下: var testButton=document.getElementById(“testButton”); function handlerTest() { var oEvent=window.event;//for IE //var oEvent=arguments[0];// for DOM if(oEvent.type==”click”) { alert(“click”); } else if(oEvent.type==”mouseover”) { alert(“mouseover”); } else { alert(oEvent.ke