0

Suppose I have a line like this on a HTML page:

<script src="/script/myscript.js" type="text/javascript"></script>

and suppose the server is not allowing me to load myscript.js directly from the browser.

Is there a way to see the javascript code inside this script from within the browser?

thanks.

1
  • With a debugger? The data has to be downloaded to be executed so it exists somewhere. Commented Sep 22, 2011 at 18:31

4 Answers 4

1

Tools/Developer Tools in Chrome. Select the Scripts tab.

enter image description here

Firebug in Firefox (this is an extension you have to add).

enter image description here

F12 or Tools/Developer Tools in Internet Explorer.

enter image description here

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

Comments

1

If Firefox, VIEW SOURCE, then click on the .js file you see highlighted in the page.

Comments

0

You can use the Web Developer tools in Chrome/FF to view the contents of scripts that are loaded for the current page.

Comments

0

just type it in your address bar http://example.com/script/myscript.js (of course replacing example.com with whatever the rest of the path is).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.