我有一个看起来像这样的 iframe:
<iframe id="iframe2" ...>
#document
<html>...</html>
</iframe>
我正在尝试iframe使用html标签获取下方的项目。
在 JavaScript 中,当我这样做时:
document.getElementByID("iframe2")
这将返回正确的 iframe。
但是,当我这样做时:
document.getElementByID("iframe2").childNodes
返回值为[]。
document.getElementByID("iframe2").getElementsByTagName("#document")并且document.getElementByID("iframe2").getElementsByTagName("html")还返回[]。
如何访问该html标签?
另外,那个#document标签叫什么?