找回密码
 加入
搜索
查看: 2638|回复: 4

[IE类操作] IE选择问题 无FORM如何选择Select (已解决)

[复制链接]
发表于 2010-11-14 02:39:34 | 显示全部楼层 |阅读模式
本帖最后由 shano 于 2010-11-14 23:17 编辑

IE表单  无FORM 如果选择Select Option

自己做了个例子

http://shano0824.72163.ftpdo.com/12.htm
发表于 2010-11-14 12:47:32 | 显示全部楼层
js的代码,你参考一下
document.getElementById("bMonth").options[1].selected=true
发表于 2010-11-14 21:54:09 | 显示全部楼层
本帖最后由 baikaifang 于 2010-11-14 21:59 编辑

不管有没有 FORM 都可以对 Option 进行操作的,2楼的方法是可行的,用到AU3里面的话,按下面的格式写就可以了。
#include <ie.au3>

$oIE = _IECreate('http://shano0824.72163.ftpdo.com/12.htm')

$oIE.document.getElementById('bMonth').options(11).selected = True

$oIE.document.getElementById('bday').options(14).selected = True

$oIE.document.getElementById('byear').options(101).selected = True

 楼主| 发表于 2010-11-14 23:16:47 | 显示全部楼层
问题解决  谢了
发表于 2013-1-28 00:54:44 | 显示全部楼层
$oIE.document.getElementById('byear').options(101).selected = True
这个很好
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-29 11:28 , Processed in 0.082948 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表