你的位置:首页 > Java教程

[Java教程]事件兼容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)});    }