I have a HTML string
Hello world
and I wan
How about document.documentElement.innerHTML. But do know that everything in the page will be replaced even the script that does that.
document.documentElement.innerHTML
For an iframe it would be like this myIFrame.contentWindow.document.documentElement.innerHTML
myIFrame.contentWindow.document.documentElement.innerHTML