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 <h1> element inside the iframe and hide it:
var iframe = document.getElementById("myFrame");
var elmnt = iframe.contentWindow.document.getElementsByTagName("H1")[0];
elmnt.style.display = "none";
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!