Search
 
SCRIPT & CODE EXAMPLE
 

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.
Comment

apply css to iframe content javascript

<script>
    setInterval(function(){
      document.getElementById("iframeId").classList.add('your-class')
    },500);
  </script>

Now you need to write css code with your class name. Thank you
Comment

PREVIOUS NEXT
Code Example
Javascript :: node command line input 
Javascript :: send event to child component angular 
Javascript :: javascript check if number is hexadecimal 
Javascript :: angular datatable reload with pagination 
Javascript :: jquery version how 
Javascript :: javascript alert on refresh 
Javascript :: contenteditable javascript 
Javascript :: download file javascript 
Javascript :: find element by two attributes jquery 
Javascript :: ecmascript 7 getmonth as 2 digits 
Javascript :: remove matching element from two array javascript 
Javascript :: control audio javascript 
Javascript :: javascript password regular expression 
Javascript :: AWS S3 JavaScript example 
Javascript :: js sort numbers descending order 
Javascript :: jquery to br 
Javascript :: cypress click 
Javascript :: material ui location icon 
Javascript :: all ajaxcomplete event 
Javascript :: how to check if a number is a whole number in javascript 
Javascript :: error while connecting mongodb MongoParseError: option usefindandmodify is not supported 
Javascript :: bootstrap switch on change 
Javascript :: how to reverse number in javascript 
Javascript :: get n number of elements from array javascript 
Javascript :: golang http POST JSON content 
Javascript :: mongoose findoneandupdate 
Javascript :: javascript name capitalization 
Javascript :: all javascript pattern programs 
Javascript :: insert item into array specific index javascript 
Javascript :: datatables add row 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =