2

There's this web site for which I'd like to write a bookmarklet. To do this, I need to find out what Javascript code is run when certain links are clicked. The links are in the form <a href="#" class="i-am-special">Do something</a>, so there's no onclick attribute for me to see what code is run.

So how do I accomplish this goal? I imagine I need to use a browser addon like Firebug in Firefox or Developer Tools in Chrome.

Sorry if this has been answered before.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Miscreant
  • 6,626
  • 3
  • 22
  • 21

1 Answers1

0

You can use Firebug for Firefox or Chrome's builtin DOM/JavaScript console to look for event listeners. It will give you the function call/name, search the code for this name...

Germann Arlington
  • 3,315
  • 2
  • 17
  • 19