日期:2014-05-16 浏览次数:20341 次
var bindAsEventListener = function(obj,fn){
return function(e){
return fn.call(obj,(e || window.event));
};
};
function addEventHandle(target,type,sFn){
if(target.addEventListener){
return target.addEventListener(type,sFn,false);
}else if(target.attachEvent){
return target.attachEvent(type,sFn);
}else{
return target['on'+type] = sFn;
}
}