Catching the specific javascript code being executed onClick

后端 未结 5 2275
孤独总比滥情好
孤独总比滥情好 2021-01-03 19:47

I am working on a site that has loads of legacy javascript and jquery includes and there is no documentation to show what is happening when.

I have a specific proble

5条回答
  •  醉话见心
    2021-01-03 20:17

    I believe there is a feature in Firebug's console window called Profile. Click profile, click the button, then click profile again. It should give you what all functions were called in that time. Be warned that if this code includes jQuery, you might get a huge long list of functions because jQuery uses tons in its code. Unfortunately, the profiler will also show anonymous functions, which can really be a pain.

    Otherwise, do a search in the code for the button's class or ID and go through them. If you have an id of fancy then you might do a search for #fancy in your code and attempt to find it. That may lead you in a general direction, at least.

提交回复
热议问题