这种下拉选择框怎么填呢? ( 积分: 88 )

  • 主题发起人 主题发起人 lytianshi
  • 开始时间 开始时间
L

lytianshi

Unregistered / Unconfirmed
GUEST, unregistred user!
在网页上只有选择了省后,市的内容才能选取.所为在程序中不知如何实现.哪位大虾能帮指点一下吗,谢谢了.

<th width=&quot;143&quot; valign=&quot;top&quot; scope=&quot;row&quot;><h6>城市<span class=&quot;must&quot;>*</span></h6></th>
<td scope=&quot;row&quot;><table width=&quot;548&quot;>
<tr>
<td colspan=&quot;2&quot;>
省:<span>
<select name=&quot;province&quot; onchange=&quot;listCity(this.value)&quot; onblur=&quot;checkProvince(province)&quot;><option value=&quot;36&quot;>其它</option>
<option value=&quot;0&quot;>----请选择省份----</option>
<option value=&quot;1&quot;>安徽</option>
<option value=&quot;2&quot;>北京</option>
<option value=&quot;3&quot;>重庆</option>
<option value=&quot;4&quot;>福建</option>
<option value=&quot;5&quot;>甘肃</option>
<option value=&quot;6&quot;>广东</option>
<option value=&quot;7&quot;>广西</option>
<option value=&quot;8&quot;>贵州</option>
<option value=&quot;9&quot;>海南</option>
<option value=&quot;10&quot;>河北</option>
<option value=&quot;11&quot;>黑龙江</option>
<option value=&quot;12&quot;>河南</option>
<option value=&quot;13&quot;>香港</option>
<option value=&quot;14&quot;>湖北</option>
<option value=&quot;15&quot;>湖南</option>
<option value=&quot;16&quot;>江苏</option>
<option value=&quot;17&quot;>江西</option>
<option value=&quot;18&quot;>吉林</option>
<option value=&quot;19&quot;>辽宁</option>
<option value=&quot;20&quot;>澳门</option>
<option value=&quot;21&quot;>内蒙古</option>
<option value=&quot;22&quot;>宁夏</option>
<option value=&quot;23&quot;>青海</option>
<option value=&quot;24&quot;>山东</option>
<option value=&quot;25&quot;>上海</option>
<option value=&quot;26&quot;>山西</option>
<option value=&quot;27&quot;>陕西</option>
<option value=&quot;28&quot;>四川</option>
<option value=&quot;29&quot;>台湾</option>
<option value=&quot;30&quot;>天津</option>
<option value=&quot;31&quot;>新疆</option>
<option value=&quot;32&quot;>西藏</option>
<option value=&quot;33&quot;>云南</option>
<option value=&quot;34&quot;>浙江</option>
<option value=&quot;35&quot;>海外</option>< lect>
</span>
市:<span>
<select name=&quot;city&quot;>< lect>
</span>
<span id=&quot;provinceInfor&quot;>
<span class=&quot;font_error&quot;>

</span>
</span>
</td>
</tr>
 
在线等...............
 
if myitem.all.item(i).tagName = 'SELECT' then // 下拉框选择
begin
myitem.all.item(i).value:='2'; // 从下拉框中选中第2项
end;
 
var
HtmlDoc:IHTMLDocument2;
myitem:Olevariant;
i:integer;
begin
myitem := WebBrowser1.Document;
for i := 0 to myitem.all.length - 1 do
begin
if myitem.all.item(i).tagName = 'SELECT' then // 下拉框选择
begin
myitem.all.item(i).value:='2'; // 从下拉框中选中第2项
end;
end;
end;


别的论坛上抄的!
 
SetCursorPos(Form1.left+180,Form1.Top+155);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
mouse_event(MOUSEEVENTF_LEFTup,0,0,0,0);
 
后退
顶部