<script src="Your-JavaScript-File.js"></script> <!--If JS file is in same folder with HTML file-->
<script src="your js file"></script>
var jsFile = document.createElement("script"); jsFile.src = "homePage.js"; // it can be path also "{themes('/scripts/homePage.js')}" document.body.appendChild(jsFile); //append it as src to body