In javascript, how can I set the innerHTML of an iframe? I mean: how to set, not get.
window[\"ifrm_name\"].document.innerHTML= \"Hi
\"
In Firefox and Chrome (don't know about Opera), you can use the data: URI scheme.
JSFiddle example
Here is a tool to generate data:URI encoded data.
This does not work in IE:
For security reasons, data URIs are restricted to downloaded resources. Data URIs cannot be used for navigation, for scripting, or to populate frame or iframe elements.
If however as you say in the comment, getting/setting the document's body is enough, you are much easier off using one of the linked examples.