本帖最后由 maker 于 2009-10-24 22:05 编辑
做了2种结果的,不知道是你要的结果不:#include <IE.au3>
$oIE = _IECreate("http://www.baidu.com/gaoji/advanced.html", 1, 1, 1)
$oForm = _IEFormGetObjByName ($oIE, "f1")
$oSelect = _IEFormElementGetObjByName ($oForm, "rn")
$val = ""
For $i=1 To $oSelect.options.length
_IEFormElementOptionSelect ($oSelect,$i-1,1, "byIndex")
$val &= $oSelect.value & @CRLF
Next
MsgBox(0, "Value ", $val )
#include <IE.au3>
$oIE = _IECreate("http://www.baidu.com/gaoji/advanced.html", 1, 1, 1)
$oForm = _IEFormGetObjByName ($oIE, "f1")
$oSelect = _IEFormElementGetObjByName ($oForm, "rn")
$val = ""
Local $oItem, $oItems = $oSelect.options
For $oItem In $oItems
$val &= $oItem.text & @CRLF
Next
MsgBox(0, "Value ", $val )
|