2013-04-26 51 views

回答

1

您獲取IHTMLDocument2的方法是CDHtmlDialog :: GetDHtmlDocument。在訪問文檔之前,您需要等待DocumentComplete。 Doing it early may not work

您調用腳本的方式是through the IHTMLWindow2 interface。你通過IHTMLDocument2 :: parentWindow屬性獲得窗口。只需在您執行的jscript中聲明一個變量即可。

+0

DocumentComplete = NavigateComplete? – 2013-04-27 04:15:44

+0

否 - 視圖在NavigateComplete2處創建,但很可能文檔仍在下載。此時不推薦代碼注入。 DocumentComplete是你應該把你的代碼期望一個完整的文檔的地方。 – 2013-04-27 14:24:37