标签:blog io sp java strong on div log cti
事件绑定
function addEvent(obj,sEv,fn){
if(obj.addEventListener){
obj.addEventListener(sEv,fn,false);
}else{
obj.attachEvent(‘on‘+sEv,fn);
}
};
解除绑定事件的封装
function removeEvent(obj,sEv,fn){
if(obj.removeEventListener){
obj.removeEventListener(sEv,fn,false);
}else{
obj.detachEvent(‘on‘+sEv,fn);
}
};
标签:blog io sp java strong on div log cti
原文地址:http://www.cnblogs.com/wujidns/p/4109393.html