标签:false blog listener function class 事件 lis pre and
/**
* addEventHandler方法
* 跨浏览器实现事件绑定
*/
function addEventHandler(ele, event, hanlder) { if (ele.addEventListener) { ele.addEventListener(event, hanlder, false); } else if (ele.attachEvent) { ele.attachEvent("on"+event, hanlder); } else { ele["on" + event] = hanlder; } }
IFE-16 addEventHandler跨浏览器实现事件绑定
标签:false blog listener function class 事件 lis pre and
原文地址:http://www.cnblogs.com/huangxingyuan/p/6367001.html