問題描述
如何跟蹤網頁的所有 Javascript 事件?
How can I trace all Javascript events of a web page?
是否有可能跟蹤所有事件,即使沒有附加處理程序?
Is there a possibility to trace all events, even such without a handler attached?
是否有任何工具可以做到這一點?
Is there any tool out there, that can do this?
澄清:
例如:
對于文本輸入,我可以為 onblur
和 onchange
添加事件處理程序.
For a text input I can add an event handler for onblur
and onchange
.
如果我(在瀏覽器中)更改文本字段的值并保留它,則兩個事件處理程序都會執行.現在我想知道我錯過了"哪些其他活動?(如果附加了事件處理程序就會被執行的那些).
If I (in the browser) change the value of the textfield and leave it, both eventhandlers are executed. Now I would like to know which other events I "have missed" (the ones which would have been executed if there was an eventhandler attached).
澄清2:
我可以獲得一個列表(在給定元素上)我可以附加事件處理程序的所有可能事件嗎?
Can I get a list(on a given element) of all possible events I can attach an eventhandler?
推薦答案
這里是 Javascript 事件列表:https://developer.mozilla.org/en-US/docs/Web/活動
Here is a list of Javascript events: https://developer.mozilla.org/en-US/docs/Web/Events
這篇關于如何跟蹤或調試所有可用的 JavaScript 事件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!