HTML事件的执行顺序
生活随笔
收集整理的這篇文章主要介紹了
HTML事件的执行顺序
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
?
var body = document.getElementsByTagName("body"); body = body[0]; body.addEventListener("touchstart", function(){console.log("touchstart")}, false); body.addEventListener("touchend", function(){console.log("touchend")}, false); body.addEventListener("touchmove", function(){console.log("touchmove")}, false); body.addEventListener("mousedown", function(){console.log("mousedown")}, false); body.addEventListener("mouseup", function(){console.log("mouseup")}, false); body.addEventListener("mousemove", function(){console.log("mousemove")}, false); body.addEventListener("click", function(){console.log("click")}, false);點擊鼠標后的事件執行順序如下:
轉載于:https://my.oschina.net/u/266531/blog/798484
總結
以上是生活随笔為你收集整理的HTML事件的执行顺序的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: CSS中块级格式化上下文(BFC)的特性
- 下一篇: linux 网络管理 防火墙 ipt