以下代码来自网络:
$.Event.getEvent=function getEvent(){
if( window.event ){
return window.event;
}else{
var aFunction = function(dArguments, dLevel){
if ( !dArguments ) return null;
if ( !dLevel ) return null;
for ( var i = 0; i < dArguments.length; i++ ){
if ( dArguments[i] && dArguments[i].altKey !== undefined ) {
return dArguments[i];
}
}
if ( dArguments && dArguments.callee && dArguments.callee.caller && dArguments.callee.caller.arguments ) {
return aFunction(dArguments.callee.caller.arguments, 5-1);
}
};
return aFunction(arguments, 5);
}
};
$.Event.stopEvent=function getEvent(){
var e =$.Event.getEvent();
if(e&&e.stopPropagation){//非IE
e.stopPropagation();
}else{//IE
window.event.cancelBubble=true;
}
};