In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article will explain in detail how vbs automatically fills out forms. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
Dim ie
Set ie=createobject ("internetexplorer.application")
Ie.visible=true
Ie.navigate "http://www.ln.chinaunicom.com/index.shtml"
While ie.busy or ie.readystate4
EndWhile
Ie.document.all ("userid"). Value= "13304948957" Mobile phone number
Ie.document.all ("passwd"). Value = "111111" 'password
Ie.document.all ("verifycode") .value = "1111" 'identification number
Ie.document.all.loginOnForm.submit
As soon as the debug script shows the missing object: "ie.document.all (".... ")"
The line "ie.document.all.loginOnForm.submit" also shows that the object does not support this property or method
Please help me to see what went wrong. Thank you.
Questioner: fxdca2008-probationary level 1
Best answer
There are several errors in the building master code:
1. EndWhile should be Wend
two。 The mobile phone number, password and other form element fields on the web page are actually on a web page, which cannot be called directly, but should be made
Use ie.document.frames (0). Document.loginOnForm... To call
The correct code is as follows (it can be filled in and submitted automatically, and the prompt of "identification code error" will be returned after submission, which is a normal phenomenon)
:
Sub test ()
Dim ie
Set ie = CreateObject ("internetexplorer.application")
Ie.Visible = True
Ie.navigate "http://www.ln.chinaunicom.com/index.shtml"
While ie.busy Or ie.readystate 4
Wend
Ie.document.frames (0). Document.loginonform.UserId.Value = "13304948957" Mobile phone number
Ie.document.frames (0) .document.loginonform.passwd.Value = "111111" 'password
Ie.document.frames (0). Document.loginonform.verifycode.Value = "1111" 'identification code
Ie.document.frames (0). Document.loginonform.submit
End Sub
This is the end of the article on "how to automatically fill out forms in vbs". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.