Function Reference


Returns the full HTML source of a document

#include <IE.au3>
_IEDocReadHTML ( ByRef $oObject )


$oObject Object variable of an InternetExplorer.Application, Window or Frame object

Return Value

Success: the HTML included in the <HTML> of the document, including the <html> and </html> tags.
Failure: sets the @error flag to non-zero.
@error: 3 ($_IEStatus_InvalidDataType) - Invalid Data Type
@extended: Contains invalid parameter number


This function returns the document source after any client-side modifications (e.g. by AutoIt or by client-side JavaScript).
It may therefore be different than what is shown by the browser View Source or by _INetGetSource().


_IEBodyReadHTML, _IEDocInsertHTML, _IEDocInsertText, _IEDocWriteHTML, _INetGetSource


; Open a browser with the basic example, read the document HTML
; (all HTML including the <HEAD> and script) and display it in a MsgBox

#include <IE.au3>
#include <MsgBoxConstants.au3>

Local $oIE = _IE_Example("basic")
Local $sHTML = _IEDocReadHTML($oIE)
MsgBox($MB_SYSTEMMODAL, "Document Source", $sHTML)