首页 > 其他 > 详细

The differences between capturing and bubbling

时间:2016-05-13 09:08:27      阅读:154      评论:0      收藏:0      [点我收藏+]

 

HTML DOM addEventListener() Method

 

the same question: bubbling and capturing

 

Syntax

element.addEventListener(eventfunctionuseCapture)
 
  useCapture:
    •   true - The event handler is executed in the capturing phase
    •   false- Default. The event handler is executed in the bubbling phase

 

Test Demo:

  https://jsfiddle.net/kkcodin/L3qo8ocp/

 

The differences between capturing and bubbling

原文:http://www.cnblogs.com/kkcodin/p/5485617.html

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