问题
I'm using Firefox. Is there something out there that will show me all the JavaScript events that are getting triggered in real time?
回答1:
You can right-click an element in Firebug's HTML tab and click Log Events.
You will then see every event received by that element in the Console tab.
You can even click one of them to explore the properties of the event
object.
回答2:
I have been using Visual Event for a few years now. It's a simple bookmarklet, meaning you just have to drag it into your bookmarks, and then click it while on your page to visually highlight all javascript events. You can also trigger the events at will, and probably a whole lot more. It's very easy and intuitive to use, and perfect to quickly find what you're looking for. Give it a try:
https://github.com/DataTables/VisualEvent
来源:https://stackoverflow.com/questions/4089516/view-javascript-events-in-browser