本文共 1407 字,大约阅读时间需要 4 分钟。
_IEFormElementGetCollection : Returns a collection object variable representing all Form Elements within a given Form.
返回文档内描述表单元素的对象变量合集
#include <IE.au3>
_IEFormElementGetCollection ( ByRef $o_object [, $i_index = -1] )_IEFormGetCollection: Returns a collection object variable representing the Forms in the document or a single form by index.
返回文档内描述表单的对象变量合集
#include <IE.au3>
_IEFormGetCollection ( ByRef $o_object [, $i_index = -1] )例子:
; *******************************************************
; Example 1 - Get a reference to a specific form element by 0-based index. ; In this case, submit a query to the Google search engine ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetCollection ($oIE, 0) $oQuery = _IEFormElementGetCollection ($oForm, 2) _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm)例子:
; *******************************************************
; Example 2 - Get a reference to the collection of forms on a page, ; and then loop through them displaying information for each ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForms = _IEFormGetCollection ($oIE) MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")For $oForm In $oForms
MsgBox(0, "Form Info", $oForm.name) Next转载地址:http://bwjci.baihongyu.com/