首页 > 其他 > 详细

addEventListener

时间:2014-10-10 22:08:55      阅读:322      评论:0      收藏:0      [点我收藏+]
 if (target.addEventListener)    //非ie 和ie9  
        target.addEventListener(type, func, false);  
    else if (target.attachEvent)   //ie6到ie8  
    target.attachEvent("on" + type, func);  
  else target["on" + type] = func;   //ie5  

addEventListener

原文:http://www.cnblogs.com/dingyuanxin/p/4017758.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!