本帖最后由 dhlhmgc 于 2015-1-11 13:46 编辑
------- test.html -------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
</head>
<frameset rows="100,*" cols="*" frameborder="no" border="0" framespacing="0">
<frame src="a.html" name="topFrame" scrolling="No" noresize="noresize" id="topFrame" title="topFrame" />
<frameset cols="180,*" frameborder="no" border="0" framespacing="0">
<frame src="b.html" name="leftFrame" scrolling="No" noresize="noresize" id="leftFrame" title="leftFrame" />
<frame src="c.html" name="mainFrame" id="mainFrame" title="mainFrame" />
</frameset>
</frameset>
<noframes>
<body></body>
</noframes>
</html>
‘-------------------------------------------------------------'////////////////
#include <IE.au3>
#include <Debug.au3>
Local $oIE = _IEAttach("test")
if @Error Then
Local $oIE = _IECreate (@ScriptDir & "\test.html")
Endif
_IELoadWait( $oIE )
Local $oFrame = _IEFrameGetCollection($oIE, 1)
; 测试 索引 0-无效 1-b.html(Frame对象) 2-c.html(Frame对象) 3-无效
$strHTML = _IEDocReadHTML ($oFrame)
msgbox(48,1,$strHTML)
; 如html中的Name属性由服务器生成(可能会变化)故没有使用_IEFrameGetObjByName ( ByRef $o_object, $s_name ) 来获取,
; 想使用索引查找方式取得, 求如何取得a.html的(Frame对象)
|