Using include files makes code maintenance much easier.
Shared libraries can be stored in central locations for multiple
applications to access. To create an include file, simple place
the function definitions in a text file, and name it with a ".js"
script directive. An example follows.
Here is the main file, test1.htm:
<input type="button" value="Test Fn" onclick="f_test1()">
Here is the include file, which contains a function:
When the button is pressed, the included function is called.