js event 无参数获取

$.event.get = function(){

if(!$.browser.msie){

if (window.event) {

return window.event;

}

var o = arguments.callee.caller;

var e;

var n = 0;

while (o != null && n < 40) {

e = o.arguments[0];

if (e && (e.constructor == Event || e.constructor == MouseEvent)) {

return $.event.fix(e);

}

n++;

o = o.caller

}

return $.event.fix(e);

}else{

return $.event.fix(window.event);

}

};

你可能感兴趣的:(jquery,js,event)