且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firefox 中的“事件"等价物

更新时间:2021-11-24 15:14:51

因为 IE 和 Chrome 把事件放在全局对象 window 中,所以你可以得到它.在firefox中,你需要让第一个参数是事件.

Because IE and Chrome put the event in the global object window, so you can get it. In firefox, you need to let the first parameter be the event.

function dayBind(event, xyzValue) {
    var e=event || window.event;
    if(event.type == 'click')
       alert('Mouse Clicked')
}