1

Is it possible to find out (in Chrome/FireFox) that which Javascript file (and hopefully line number) is being used on a web page by a specific element?

Thanks

3
  • 2
    You mean which javascript uses that element? Javascript could be referencing that element in a large number of different ways (by tagname, id, class, etc). Commented Apr 4, 2013 at 16:03
  • Yah, so for e.g, If I click, say a textbox, I need to know which Javascript is being used by it. Commented Apr 4, 2013 at 16:06
  • 1
    You're looking at it backwards. JS is not used by elements. JS uses elements. Commented Apr 4, 2013 at 16:18

1 Answer 1

3

The question is a bit unclear, but I can show you how to watch a particular element for JavaScript interaction in Chrome:

enter image description here

Then, after you do that, watch as we click the checkbox:

enter image description here

Some reference for Chrome: https://developers.google.com/chrome-developer-tools/docs/overview

Most other browser work in a similar fashion. There are also other ways to find out how JavaScript code is interacting with your page, but you'll need to give me a more specific scenario to answer that.

Sign up to request clarification or add additional context in comments.

1 Comment

I didn't know that Chrome could do this, thanks a ton.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.