var script = document.createElement("script"); script.setAttribute("type", "text/javascript"); script.setAttribute("src","https://www.k12insight.com/Lets-Talk/js/lt_controller.js?k=19"); document.getElementsByTagName("head")[0].appendChild(script);