/ Published in: JavaScript
Get one javascript file to include other required javascript files.
Usefull when externalising blocks of code from html
(Found at linked URL)
Usefull when externalising blocks of code from html
(Found at linked URL)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function IncludeJavaScript(jsFile) { document.write('<script type="text/javascript" src="' + jsFile + '"></scr' + 'ipt>'); } IncludeJavaScript('my_2nd_file.js');
URL: http://www.cryer.co.uk/resources/javascript/script17_include_js_from_js.htm