Web Development

General discussion


How Many Javascript Source Files?

By mathguy7 ·

I am accustomed to the usual format for including a Javascript source file in my web page, for example:

<script language="javascript" src="file.js">

I am now considering breaking up a large program into several smaller files; however, I do not know if this is allowed.

Is it permissible to include multiple Javascript source files in a page?
If so, please let me know the syntax for doing so.

Thanks in advance for any help.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

multiple source files

by Jay Eckles In reply to How Many Javascript Sourc ...

It is definitely permissable to include multiple source files. You do it just by including multiple SCRIPT tags:

<script src="source1.js" type="text/javascript" language="Javascript"></script>
<script src="source2.js" type="text/javascript" language="Javascript"></script>
<script src="source3.js" type="text/javascript" language="Javascript"></script>

Good luck.


Related Discussions

Related Forums