This does the trick, at least in FF, IE, and Opera.
document.getElementById('your_iframe_id').contentWindow.document.body.style.color='white';
In Chrome, you can change the background color of an IFRAME
:
document.getElementById('your_iframe_id').style.background='white';
And to change the background color in IE:
document.getElementById('your_iframe_id').contentWindow.document.body.style.backgroundColor='yellow';
Then there is a big one, but ... those expressions, including contentWindow
, only work if the iframe and host page are in the same domain.
(By default, IE has only a white background)
Teemu source share