Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

html iframe and JS contentwindow

var x = document.getElementsByTagName("iframe")[0].contentWindow;
//x = window.frames[0];

x.document.getElementsByTagName("body")[0].style.backgroundColor = "blue";
// this would turn the 1st iframe in document blue.
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #html #iframe #JS #contentwindow
ADD COMMENT
Topic
Name
9+8 =