补充一些自己容易忘的知识点:

event.stopPropagation() 阻止事件冒泡

event.preventDefault()  阻止事件的默认行为

return false  相当于event.stopPropagation() + event.preventDefault() 。除了阻止默认行为之外,还会阻止事件冒泡。

相关文章:

  • 2021-12-13
  • 2022-12-23
  • 2021-07-27
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2021-11-30
  • 2021-12-26
  • 2022-12-23
相关资源
相似解决方案