Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to look at the Javascript that a page is using?

Are you able to see the coding of a Javascript function on a webpage your viewing? Is there a way using Google Chrome DevTools for example?

Specifically, I want to figure out how to code something like this !Example 1

from this page http://www.indeed.com/cmp/Bruce-Productions/jobs/Graphic-Designer-0a8d9cff06bf2790

Thanks in advance for any help!

like image 604
Brenda Carey Avatar asked Sep 03 '25 17:09

Brenda Carey


2 Answers

Yes there is a way to look at all of a webpages html, Javascript files, and CSS using Chrome. Open up the page in chrome, right click on the page and select inspect element (or press ctrl+shift+I). From there you can navigate the different elements on the the page and the structure of the HTML file. To get at the Javascript and CSS files switch over to the sources tab and look through the folders on the left to find the file you are looking for.

A word of warning, depending on the site the code that they are using may be minified (most all of the white space removed, and lots of variable names and other things shortened) or otherwise very difficult to read. If you are looking to do something more specific then I would recommend searching for that, or posting a question regarding that problem.

like image 140
Malco Avatar answered Sep 05 '25 05:09

Malco


If you want to view the Javascript code, you can right-click the page, then select Inspect, then navigate to the javascript line by highlighting or selecting that line with .js extension and then position your pointer in the .js file, right-click & select Reveal in Sources panel.

like image 39
alexa Avatar answered Sep 05 '25 06:09

alexa