手机
当前位置:查字典教程网 >脚本专栏 >vbs >vbs自动填表单分析附源码
vbs自动填表单分析附源码
摘要:dimiesetie=createobject("internetexplorer.application")ie.visible=true...

dimie

setie=createobject("internetexplorer.application")

ie.visible=true

ie.navigate"http://www.ln.chinaunicom.com/index.shtml"

Whileie.busyorie.readystate<>4

EndWhile

ie.document.all("userid").value="13304948957"'手机号码

ie.document.all("passwd").value="111111"'密码

ie.document.all("verifycode").value="1111"'识别码

ie.document.all.loginOnForm.submit

一调试脚本就显示缺少对象:"ie.document.all("....")"

"ie.document.all.loginOnForm.submit"这行还显示对象不支持此属性或者方法

请各位大侠帮忙看看哪里出了错谢谢啦

提问者:fxdca2008-试用期一级

最佳答案

楼主代码有几处错误:

1.EndWhile应为Wend

2.网页上的手机号码、密码等表单元域其实是在一个<iFrame>中的网页上,不能直接调用,而应该使

用ie.document.frames(0).document.loginOnForm...来调用

正确代码如下(可以自动填写交提交,提交上去以后会返回“识别码错误”的提示,属于正常现象)

Subtest()

Dimie

Setie=CreateObject("internetexplorer.application")

ie.Visible=True

ie.navigate"http://www.ln.chinaunicom.com/index.shtml"

Whileie.busyOrie.readystate<>4

Wend

ie.document.frames(0).document.loginonform.UserId.Value="13304948957"'手机号码

ie.document.frames(0).document.loginonform.passwd.Value="111111"'密码

ie.document.frames(0).document.loginonform.verifycode.Value="1111"'识别码

ie.document.frames(0).document.loginonform.submit

EndSub

【vbs自动填表单分析附源码】相关文章:

vbs实现的图片自适应表格,目前最佳解决方案!

用vbs列出注册表中 Run 项中的所有项目

emule自动关机脚本

用vbs实现cmd功能的代码

vbs 注册表操作类代码

vbscript自动配置IIS的代码

vbs获取当前路径的代码

adodb.stream读文件到数组的代码

vbs删除注册表项的代码

vbs选择文件夹效果代码

精品推荐
分类导航