Sunday, 1 April 2018

Include a JavaScript file in a JavaScript file





Possible Duplicate:
How to include a JavaScript file in another JavaScript file?







I want to include a JavaScript file in a JavaScript file. include('filename.js'); is not working



What is the right code?


Answer



function includeJS(incFile)
{

document.write('');
}


Then include a second JavaScript file by calling:



includeJS('filename.js');

No comments:

Post a Comment

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...