If your Javascript code is too big or just for readability and management purposes, it’s best to include Javascript codes from an external file. This method is also suitable for reusability purposes.

The code below will load the Javascript code stored in myscript.js to the calling file.

<script language="JavaScript" type="text/javascript" src="myscript.js">
Discuss the article:

Comment anonymously. Login not required.