浅谈 return false 和preventDefault stopPropagation stopImmediatePropagation 的正确用法

1.使用return false实际上做了3件事:(谨慎使用)

  event.preventDefault();

  event.Propagation();

  停止回掉函数执行并立即返回

2.event.preventDefault()  ----->阻止浏览器继续执行默认行为

3.event.stopPropagation() ----->停止事件冒泡 event bubbling

4. stopImmediatePropagation ------>停止一个事件执行

link:http://www.jb51.net/article/42711.htm

原文地址:https://www.cnblogs.com/xshaohua-com/p/6704469.html