autoit3 ie.au3 函数之——_IEBodyReadHTML、_IEBodyWriteHTML

_IEBodyReadHTML : Returns the HTML inside the <body> tag of the document.

即:返回文档内 <body> 标签内的HTML代码

#include <IE.au3>
_IEBodyReadHTML ( ByRef $o_object )


例子: 提取已知网页代码, 并进行修改。

#include <IE.au3>
$oIE = _IECreate ("basic")
$sHTML = _IEBodyReadHTML ($oIE)
$sHTML = $sHTML & "<p><font color=red size=+5>Big RED text!</font>"
_IEBodyWriteHTML ($oIE, $sHTML)


_IEBodyWriteHTMLReplaces the HTML inside the <body> tag of the document.

即: 替换文档内 <body> 标签内的HTML代码.

#include <IE.au3>
_IEBodyWriteHTML ( ByRef $o_object, $s_html )

Parameters

$o_object Object variable of an InternetExplorer.Application, Window or Frame object
$s_html The HTML string to write to the document

例子:重写已知代码

#include <IE.au3>
$oIE = _IE_Example ("iframe")
$oFrame = _IEFrameGetObjByName ($oIE, "iFrameTwo")
_IEBodyWriteHTML ($oFrame, "Hello <b>iFrame!</b>")




你可能感兴趣的:(autoit3 ie.au3 函数之——_IEBodyReadHTML、_IEBodyWriteHTML)