iFrame无法获取INPUT对象的问题
本帖最后由 heavenm 于 2015-4-2 16:47 编辑#Region ;**** 参数创建于 ACNWrapper_GUI ****
#PRE_Res_requestedExecutionLevel=None
#PRE_Tidy_Stop_OnError=n
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <IE.au3>
;https://msdn.microsoft.com/en-us/library/ie/ms536439(v=vs.85).aspx
$OIE = _IEAttach('http://post.58.com/79/111/', 'url')
$oFrame1 = _IEFrameGetCollection($oIE, 0)
$oFrame2 = _IEFrameGetCollection($oFrame1, 0)
MsgBox(0, IsObj($oFrame2),_IEPropertyGet($oFrame2, "classname"))
Exit
Func _IETagGetCollection($__Object, $__TagName, $__Pattern = '', $__Mode = 0, $__Exclude = -1)
If Not IsObj($__Object) Then Return SetError(1, 0, 0)
Local $__IETagIndeX, $__TEMP,$__sTEMP
$__IETagIndeX = _IETagNameGetCollection($__Object, $__TagName);获取链接集合
For $__TEMP In $__IETagIndeX
If $__Exclude <> -1 And StringRegExp($__TEMP.outerhtml, $__Exclude) Then ContinueLoop
Select
Case $__Mode == 0
If StringRegExp($__TEMP.outertext, $__Pattern) Then Return SetError(0, 0, $__TEMP)
Case $__Mode == 1
$__sTEMP=StringRegExp($__TEMP.outerhtml, '<.*?>',1)
If StringRegExp($__sTEMP, $__Pattern) Then Return SetError(0, 0, $__TEMP)
Case Else
Return SetError('你确定输入的参数是数字?', 0, 1) ; Could be caused by parameter 2, 3 or both
EndSelect
Next
Return SetError(0, 0, '无匹配')
EndFunc ;==>_IETagGetCollection
http://post.58.com/79/111/s5?PGTID=14278783095200.6357901414444583&ClickID=1
测试链接
页:
[1]