Can I find events bound on an element with jQuery?

前端 未结 9 2084
南旧
南旧 2020-11-22 07:11

I bind two event handlers on this link:

Show Alert

JavaScript:

$(         


        
9条回答
  •  情书的邮戳
    2020-11-22 07:49

    You can now simply get a list of event listeners bound to an object by using the javascript function getEventListeners().

    For example type the following in the dev tools console:

    // Get all event listners bound to the document object
    getEventListeners(document);
    

提交回复
热议问题