var EventUtil = { addHandler:function(element,type,handler){ if(element.addEventListener){ element.addEventListener(type,handler,false); }else if(element.attachEvent){ element.attachEvent("优艾设计网_设计模板on"+type,handler); }else{ element["on"+type] = handler; } }, removeHandler:function(element,type,handler){ if(element.removeEventListener){ element.removeEventListener(type,handler,false); }else if(element.detachEvent){ element.detachEvent("on"+type,handler); }else{ element["on"+type] = null; } } }; var handler={ message:"Event handled", handleClick:function(event){ alert(this.message); } }; var btn=document.getElementById("btn"); EventUtil.affffdHandler(btn,"click",bind(handler.handleClick,handler));
淡淡如菊795优艾设计网_电脑技术 2022-06-26 11:28
最后一行bind函数没有定义
chenruzhen 2022-06-26 11:41 优艾设计网_设计LOGO
bind is no defined; bind没有定义,不是说得很明显了么
精彩评论