当我尝试访问iframe元素的contentWindow.document时,收到错误0x80070005 - Access is denied.
。
是否无法访问iframe文档的元素?
文件:
Iframe.html的
<html>
<head></head>
<body>
<iframe width="100%" height="100%" name="myframe" src="http://www.w3schools.com"></iframe>
</body>
</html>
iframe_test.ahk
Gui, New, Resize MaximizeBox
Gui, Add, ActiveX, vWB w780 h580, % A_ScriptDir "\iframe.html"
Gui, show, w800 h600
Loop
Sleep 10
Until (WB.readyState=4 && WB.document.readyState="complete" && !WB.busy)
msgbox % WB.document.All["myframe"].contentwindow.document.documentElement.innerHTML