Welcome to SO. There are different option to get the associated events.
Let's take the stackoverflow search box (the one which is on the top with s-input js-search-field
class)
1) Using getEventListeners
Go to chrome console in the dev tools and then use getEventListeners(element)
.
getEventListeners(document.querySelector('.s-input.js-search-field '))
2) Using Dev Tools Event Listner
Go to chrome dev tools and select the element for which you want to know the events, click on the Event Listeners
tab on the right hand side pane.
3) Using the firefox event
Goto dev tools in firefox and click on events
bubble at the end of html element tag.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…