iframe getElementById
document.getElementById('myframe1').contentWindow.document.getElementById('x')
Relieved Reindeer
document.getElementById('myframe1').contentWindow.document.getElementById('x')
const iframe = document.getElementById("myIframe");
const iWindow = iframe.contentWindow;
const iDocument = iWindow.document;
// accessing the element
const element = iDocument.getElementsByTagName("p")[0];
element.style.color = "green";