使用Chrome浏览器,在开发者工具里面查看。
步骤是:
Chrome DevTools->console->getEventListeners(document.querySelector('.someclass'));
本文介绍如何使用Chrome浏览器的开发者工具来监听指定DOM元素上的所有事件。通过Chrome DevTools的console面板,可以方便地获取到document.querySelector选择器所选中元素的所有绑定事件。
使用Chrome浏览器,在开发者工具里面查看。
步骤是:
Chrome DevTools->console->getEventListeners(document.querySelector('.someclass'));
9717

被折叠的 条评论
为什么被折叠?
