网页上有一个包含代码的下拉框:
<select 
name="ctl00$ctl05$ddlCurrency" 
id="ctl00_ctl05_ddlCurrency" 
class="ddlCurrency" 
style="font-size:x-small;width: 55px; background-color: #EDEEEF;">
    <option value="AUD">AUD</option>
    <option value="EUR">EUR</option>
    <option value="GBP" selected="selected">GBP</option>
    <option value="USD">USD</option>
</select>请告诉我如何使用vbscript将IE窗口中下拉框的所选选项值"GBP“更改为"USD”?
谢谢,
Pers2012
发布于 2013-07-30 06:50:45
试试这个:
Set ie = CreateObject("InternetExplorer.Application")
ie.Visible = True
ie.Navigate "http://www.example.com/"
While ie.Busy : WScript.Sleep 100 : Wend
For Each opt In ie.document.getElementById("ctl00_ctl05_ddlCurrency").Options
  If opt.Value = "USD" Then
    opt.Selected = True
  Else
    opt.Selected = False
  End If
Nexthttps://stackoverflow.com/questions/17932924
复制相似问题