I have a Javascript function that is passed a string. The string that it is passed is an entire webpage, including the header. I need the Javascript to replace the entire
var script = document.createElement('script'); script.src = 'http://code.jquery.com/jquery-1.7.2.min.js'; script.type = 'text/javascript'; document.getElementsByTagName('head')[0].appendChild(script);