javascript how to include a javascript file code example
Example 1: include other js files in a js file
document.writeln("<script type='text/javascript' src='Script1.js'></script>");
document.writeln("<script type='text/javascript' src='Script2.js'></script>");
Example 2: how to write code in external javascript file
function myFunction() {
document.getElementById("demo").innerHTML = "Paragraph changed.";
}