[英]How can I tell which event fires when I click on an HTML object?
I'm trying to download and re-use the phone simulator here , and I want to find the javascript that allows me to switch devices in the "OS Simulator mode". 我正在尝试在此处下载并重新使用电话模拟器 ,并且我想找到允许我在“ OS Simulator模式”下切换设备的JavaScript。
Right now I have a local instance working, but the page isn't refreshing as it should be. 现在我有一个本地实例在工作,但是页面没有刷新。 I tried the Javascript console in chrome but I don't see any events " fly by " as I click on the object and wait for something to happen in the F12 window. 我在chrome中尝试了Javascript控制台,但是当我单击对象并等待F12窗口中发生的事情时,没有看到任何“飞过”的事件。
How do I get the event name for the Javascript that should be firing? 如何获取应该触发的Javascript的事件名称?
function eventLogger(e) {
console.log(e);
}
$(document).bind("click keydown keyup mousemove", eventLogger);
you can add/update the bind events to get log on additional events you want to capture. 您可以添加/更新绑定事件,以获取要捕获的其他事件的日志。
Check this: 检查一下:
$("*").click(function(){
alert($(this).prop("tagName"));
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.