General discussion

Locked

How Many Javascript Source Files?

By mathguy7 ·
Hello.

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">
</script>

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.

1 total post (Page 1 of 1)  
| 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.

Jay

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums