2
如何获取iFrame中的所有元素?我使用一些JavaScript代码在这里,但我不知道接下来我做什么,以及如何获取里面的所有元素中的iframe:获取iFrame中的所有元素
<iframe id="uploads" src="https://jsfiddle.net/mekwall/up4nu/"></iframe>
var iframe = document.getElementById('uploads');
var innerDoc = iframe.contentDocument;
我使用contentDocument
这是只给出<html><body></body></html>
您无法使用Javascript读取其他域的内容。 –