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
document.getElementsByTagName("html")[0].innerHTML Contains both head and body tags. I Usually avoid document.open\write\close
document.getElementsByTagName("html")[0].innerHTML
head
body
document.open\write\close