function addEvent(obj,event,fn){ //添加事件
if(obj.addEventListener){
obj.addEventListener(event,fn,false);
}else if(obj.attachEvent){
obj.attachEvent("on"+event,fn);
}
}
看别的视频有添加事件的函数
function addEvent(obj,event,fn){ //添加事件
if(obj.addEventListener){
obj.addEventListener(event,fn,false);
}else if(obj.attachEvent){
obj.attachEvent("on"+event,fn);
}
}
看别的视频有添加事件的函数
2014-11-06
举报