IE 9 error getElementbyId: Object required

前端 未结 1 2034
走了就别回头了
走了就别回头了 2021-01-23 16:46

for some reason, VBS below works like a charm in IE 8, but in IE9 on both of my Laptops I get Object Required at .getElement.

How can I fix this please.

1条回答
  •  温柔的废话
    2021-01-23 17:33

    You need to use the right names. The names you have given are the Name property, not the ID, so:

    .getElementByID("login_username").value = "myuser"
    .getElementByID("login_password").value = "mypass"
    

    Should be:

    .getElementByID("username").Value = "myuser"
    .getElementByID("pass").Value = "mypass"
    

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