var script = document.createElement("SCRIPT"), head = document.getElementsByTagName( "head" )[ 0 ]; script.type = "text/javascript"; script.src = 'newscript.js'; head.appendChild( script );