How to get an element from within an iframe?

Get an element from within an iframe with JavaScript. Click the button to hide the first H1 element in the iframe (another document). Get the first

element inside the iframe and hide it: var iframe = document.getElementById(“myFrame”); var elmnt = iframe.contentWindow.document.getElementsByTagName(“H1”)[0];
For More Information Please Refer:

You May Also Like to Read: