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?

user2864740
  • 60,010
  • 15
  • 145
  • 220
Yotam Salmon
  • 2,400
  • 22
  • 36

1 Answers1

12

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
szoszk
  • 349
  • 7
  • 22