How can I get source code of page thru WebBrowser-Control (ActiveX InternetExplorer)?
问题 How can I get source code of page thru WebBrowser Control (ActiveX InternetExplorer)? I have an xml document "foo.xml". var Web: TWebBrowser; begin ... Web.Navigate("foo.xml"); // How can I get source code thru WebBrower control<---- ... end; 回答1: In the DocumentCompleted event, look at the DocumentText property of the WebBrowser control. It should have the complete text of the loaded page. 回答2: IHTMLDocument2(Web.Document).Body.InnerHTML; This should return the source of the page. 回答3: I