6

During some code investigating, I found a html submit button like this:

<button class="btn btn-primary">Create new aicraft</button>

I know somewhere there is javascript code that handeles the button click event. How can I find that javascript code?

2
  • 4
    In Chrome, right click on the button and go to Inspect Element. Look at the Event Listeners tab Commented Aug 1, 2015 at 21:43
  • I was there and still didn't find my answer. Commented Aug 1, 2015 at 21:50

1 Answer 1

15

In Firefox:

  1. F12
  2. Find the line you want to inspect
  3. Click on the small ev button at the end of the line (if there is nothing then no JavaScript is linked)
  4. See what is linked to it

In Chrome:

  1. F12
  2. Click on the line you want to inspect
  3. Click on the "Event Listeners" Tab (where you see the styles by default)
  4. There you can see the linked events

In Edge:

  1. F12
  2. Click on the DOM Explorer tab
  3. Click on the line you want to inspect
  4. Click on the "Events" Tab (where you see the styles by default)
  5. There you can see the linked events
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.