VBS Script getElementbyID Error (AutoLogin Script)

后端 未结 1 815
臣服心动
臣服心动 2021-01-28 10:51

I am writing .vbs script file which works for different sites, but I am writing auto login script for my university web page for internet page login.

So I have working t

1条回答
  •  梦谈多话
    2021-01-28 11:21

    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

    
    

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

    dim elements: set elements = document.getElementsByName("username")
    elements(0).Value = "username"
    

    0 讨论(0)
提交回复
热议问题