Hi all,

Instead of writing javascript functions on the html page it self, we could write those in separate “.js” file and import it as follow.

<script src="fileName.js" ></script>


But when we do this and check the web page source on the browser, there is no any JavaScript function there..
But those functions cab be executed. so there should be those functions on the client machine..

So I want to know where those JavaScript functions are..????


Thanks....
janaka priyadarshana

Member Avatar for GreenDay2001

When you include a .js file all the functions are available to page. All functions could be executed. Even if you cant see the javascript code, the the is actually downloaded. Whenever a web page loads it loads all things in it, including images, css files anf js too.

If you want to see it yourself delete all temerory internet files, cookies and then open a web page with js file included. You can see that js file in Temporary Internet File Directory.

So dont worry about it, its normal and will work everywhere.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.