懂VB的帮我写个网页快速登陆窗口!

来源:百度知道 编辑:UC知道 时间:2024/06/05 13:05:16
会写VB的帮我写个网页快速登陆窗口,要求:

一个TEXT为用户名
一个TEXT为密码
还有一个按钮为登陆

点了按钮自动用TEXT的帐号密码登陆http://qq.xyaqw.cn/admin/admincp.php这个地址。

谢谢!

Set Wshell=Wscript.CreateObject("Wscript.Shell")
Set ie7=Wscript.CreateObject("InternetExplorer.Application")
ie7.visible=True
ie7.navigate "http://qq.xyaqw.cn/admin/admincp.php"
Wscript.Sleep 4000
if ie7.Busy then
Wscript.Sleep 2000
end if

ie7.Document.all.username.value="用户名"
ie7.Document.all.password.value="密码"
ie7.Document.all.password.focus
WShell.SendKeys "~"

上面代码保存为扩展名为VBS的文件 运行即可。