-1

I am using Firebug in Firefox. A button has various attributes like id, name and class. I am having a hard time to find out, which JavaScript function is getting exectued using Firebug.

Is there a quick way to get to know, which function gets executed when I click on an HTML element?

Sebastian Zartner
  • 18,808
  • 10
  • 90
  • 132
user3198603
  • 5,528
  • 13
  • 65
  • 125
  • Your question is a bit vague. As far as I understand what you want to know is how to get the event handlers for a specific element and this was [already asked before](http://stackoverflow.com/q/570960/432681). – Sebastian Zartner Nov 24 '15 at 22:21

1 Answers1

1

You could add some code like console.log("In function 1"); to the functions to determine which are being called, if there aren't many functions. You can also check the onclick="" attribute on the HTML of the buttons or if the page uses jQuery the $(".some-class").on('click', function(){}) functions.

I think you should know what functions you are supposed to be calling, unless you're doing some reverse engineering or trying to copy/emulate some code from another page.