Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图搜索但没有找到确切的解决方案。
如果 div 元素具有由 jquery 设置的 onclick 事件侦听器,而不是如何在 chrome 开发工具中单击时触发值/函数?
我尝试使用开发工具,但它只显示'content js min.js:1'。
请看这张图片http://myfilestore.tk/net/Capture.PNG?a=so14052013
看起来您想要的是查看为元素注册的单击事件处理程序。
您可以在控制台中使用事件数据来实现这一点,但您必须注意它是私有方法 - 未记录的将来可能会在没有任何通知的情况下发生更改
前任:
var clicks = jQuery._data( jQuery('element')[0] , "events" ).click;
也阅读这个问题
演示:小提琴
jQuery Audit 插件插件应该可以解决问题。它并不完美,但它应该给你你想要的。