var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'blablabla.js'; document.head.appendChild(script);