var script = document.createElement('script'); script.type = 'text/javascript'; script.src = 'http://code.jquery.com/jquery-1.8.3.js'; document.head.appendChild(script);