日期:2014-05-16  浏览次数:20318 次

Firefox 中的事件
在Firefox中事件中有参数后怎么传Event对象
例 
<input type="button" id="btn" name="btn" value="test" onclick="test(1,2)" />

function test(){ //Firefox下,在这怎么获取Event对象.
}

------解决方案--------------------
JScript code
function test(oEvent){
    if(!oEvent)
    oEvent = window.event;
}

------解决方案--------------------
<input type="button" id="btn" name="btn" value="test" onclick="test(event,1,2)" /> 

function test(evt,arg1,arg2){ //Firefox下,在这怎么获取Event对象. 
 
}
evt参数便是event对象.