Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q974 How can I include multiple *.js source files in a page?

You are here: irt.org | FAQ | JavaScript | Source | Q974 [ previous next ]

Try:

<script src="file1.js"></script>
<script src="file2.js"></script>
<script src="file3.js"></script>
<script src="file4.js"></script>

Or:

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

And then in file.js:

document.write('<script src="file1.js"><\/script>');
document.write('<script src="file2.js"><\/script>');
document.write('<script src="file3.js"><\/script>');
document.write('<script src="file4.js"><\/script>');

©2018 Martin Webb