VBS Script getElementbyID Error (AutoLogin Script)

爱⌒轻易说出口 提交于 2019-12-02 09:25:11

I'm not sure a form element has a member method called submitAction. Should it be simply submit?

And I don't see any elements with the IDs you're looking for: "username", "password" or "top"

With IE.Document
    .getElementByID("username").value = "myuser"
    .getElementByID("password").value = "mypass"
    .getElementByID("top").submitAction
End With

I'm guessing you're looking for eg

<td width="31%"><input type="text" maxlength=63 size=25 name=username /></td>

where you would use getElementsByName, which returns an array of elements

dim elements: set elements = document.getElementsByName("username")
elements(0).Value = "username"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!