iframe innerHTML在浏览器中可见,但在代码中为null

时间:2015-04-10 11:37:13

标签: c# html iframe internet-explorer-8 mshtml

我正在尝试使用mshtml访问网站上的iframe。

  • 我可以在浏览器的网站框架中看到innerHTML。
  • 我还可以从代码中访问iframe中的“DIV”。
  • 文档也已正确加载。
  • iframe也属于同一个域。

I can see the innerHTML in the website's frame in browser

但是当我在代码中查找它时,它显示为null。

I am looking for it in the code, it is showing null

有人可以帮忙吗?

我尝试了This,但没有获益。

1 个答案:

答案 0 :(得分:1)

请尝试

doc.document.getelementbyid

IE 11 已更改了一些访问属性。

readystate is no longer supported by IE 11