开发者

See what methods/events being called in JS

Got this page which has some javascript on it (very heavy) and I am trying to see what happens when I click a certain element. However looking at the code there is no onclick function - the javascript is several JS files so take far to long to browse.

Is there a way with Firefox (firebug), Chrome or even IE to view wh开发者_JAVA百科ats / log what is happening when I click on an element in the browser?


In firefox (and this is also available in chrome and IE in another form) install addon firebug (if not installed). Go to Tools->Birebug->Open Firebug. Click on Left Icon and ask for tracing. You can then trace your program. Another way is to cause a breakpoint when you start, and you manually follow the execution of the script.


Chrome Developer Tools shows all attached event handlers for an element. See the section on Event Listeners towards the end.

See what methods/events being called in JS


@wizzard, try this: firebug - profiling button
ff only, but there is a lite version for chrome for example

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜