IE 9 error getElementbyId: Object required

前端 未结 1 2033
走了就别回头了
走了就别回头了 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)
提交回复
热议问题