問題描述
如何跟蹤網(wǎng)頁的所有 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?
是否有任何工具可以做到這一點(diǎn)?
Is there any tool out there, that can do this?
澄清:
例如:
對(duì)于文本輸入,我可以為 onblur
和 onchange
添加事件處理程序.
For a text input I can add an event handler for onblur
and onchange
.
如果我(在瀏覽器中)更改文本字段的值并保留它,則兩個(gè)事件處理程序都會(huì)執(zhí)行.現(xiàn)在我想知道我錯(cuò)過了"哪些其他活動(dòng)?(如果附加了事件處理程序就會(huì)被執(zhí)行的那些).
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:
我可以獲得一個(gè)列表(在給定元素上)我可以附加事件處理程序的所有可能事件嗎?
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/活動(dòng)
Here is a list of Javascript events: https://developer.mozilla.org/en-US/docs/Web/Events
這篇關(guān)于如何跟蹤或調(diào)試所有可用的 JavaScript 事件的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!