How to use Chrome browser for JS debugging to find element-bound Click events

Source: Internet
Author: User
Tags event listener

We have not encountered such a problem, we are in the analysis of some large e-commerce platform Web front-end script, want to find an element binding Click event, not so easy, because some front-end script encapsulation of the relatively hidden, and even some encryption script, with the traditional search element ID, or page source method to find, May be in vain at last. Let me show you the events that use Chrome to find the binding of elements.


It's easy to find a binding event with the following three features in Chrome browser.

1.Sources (source code)
2.Event Listener Breakpoints (Event listener breakpoint)
3.Call stack (function call stack)


Give me a chestnut:


1. Open a website, click on the "100x100" option in "Specifications", press F12, pop up the front-end debugging window, switch to Sources tab.

2. Look at the right window (event Listener breakpoints) bar and select the Click option (listen for click events).

3. Expand Call stack (function calling stack).

4. Then click on the label or press F11 to observe the callstack.

5. Press F11 or press the button until the event is discovered as a direct event source.

All the way down, you must have patience .....

Here has found the source of the event!!!

How to use Chrome browser for JS debugging to find element-bound Click events

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.