事件兼容IE

addEvent:function(target, functionref, tasktype) {
            if (target.addEventListener)
                target.addEventListener(tasktype, functionref, false);
            else if (target.attachEvent)
                target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
        }

 

posted @ 2016-07-17 10:07  kan_kan  阅读(145)  评论(0编辑  收藏  举报