The easiest way would be to use a server-side languge: PHP or ASP or JSP, all of which allow you to include multiple source files into a single web page.
You could also use JS to read that in as a text file and then dump the contents thereof into the innerHTML of some object on the page.
Both of the JS methods require that the page doing the importing provide some code to specify how and where to put the imported code/data.
The last, not recommended, way would be to use JS code to read in the text and use document.write( ) to put it in place on the code wherever the <script> tags that do the reading are located.
Truly, a server-side solution is the best over all. Use it if you can.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.