How do I find what Javascript is running on certain events?

后端 未结 4 1752
孤街浪徒
孤街浪徒 2020-12-23 21:25

I\'ll pick Chrome for this example, but I\'m open to a solution from any browser.

Use Case: I have an update button on my website that is used to update item quantit

4条回答
  •  执念已碎
    2020-12-23 21:27

    1. Open your page in Firefox with Firebug enabled.
    2. Go to console tab in firebug and click profiling
    3. enter 0 in the textbox and click the button.
    4. Stop profiling.
    5. You will be able to see all the javascript functions which have executed due to your actions. You can view them one by one to figure out which method has caused the mischief.

提交回复
热议问题