我正在尝试使用VBscript在我的网站上实现自动登录,并在cmd上通过批处理命令运行它。
自动登录已完成,但我也遇到以下错误:
VB脚本运行时错误对象需要Ipf 请帮忙,为什么我收到此错误? 这是代码
Set IE = CreateObject("InternetExplorer.Application")
IE.navigate "mysitename"
IE.Visible = True
While IE.Busy
WScript.Sleep 50
Wend
Set ipf = IE.document.getElementByID("login")
ipf.Value = "loginid"
Set ipf = IE.document.getElementByID("password")
ipf.Value = "password"
Set ipf = IE.document.getElementByID("button")
ipf.Click
答案 0 :(得分:0)
在集合之前写下Dim ipf
。
您需要先声明对象。