Set the ie=CreateObject (" InternetExplorer. Application ")
With ie
The Visible=True
. Navigate "http://192.168.1.3/M0B2/login.aspx"
Do Until the ReadyState=4
DoEvents
Loop
. Document. All (" txtEMPID "). The Value="https://bbs.csdn.net/topics/123456"
. Document. All (" txtPWD "). The Value=https://bbs.csdn.net/topics/123456 "
. Document. All (" btnLogin "). Click
End With
End Sub
Refer others to an automatic login web site script a single can be normal use, if have the second button will prompt the first account no exit, found after the test, the manual open a new TAB can be repeated login, IE the analysis problem is direct access to the IP address is a session, excuse me whether can set the related parameters for each click is to open a new TAB?
Thank you all!
CodePudding user response:
If you want to develop the browser suggest you use BHO technology, if you want to extract or setting up WEB site information, suggest you use the AJAX technology, of course can't call AJAX in VB, should call ABAXCodePudding user response:
Try this line not line:
Private Sub Command1_Click ()
Set the ie=CreateObject (" InternetExplorer. Application ")
With ie
The Visible=True
. Navigate "http://192.168.1.3/M0B2/login.aspx"
Do Until the ReadyState=4
DoEvents
Loop
. Document. All (" txtEMPID "). The Value="https://bbs.csdn.net/topics/123456"
. Document. All (" txtPWD "). The Value="https://bbs.csdn.net/topics/123456"
. Document. All (" btnLogin "). Click
End With
End Sub
Private Sub Command2_Click ()
Set the ie=CreateObject (" InternetExplorer. Application ")
With ie
The Visible=True
. Navigate "http://192.168.1.3/M0B2/login.aspx"
Do Until the ReadyState=4
DoEvents
Loop
. Document. All (" txtEMPID "). The Value="https://bbs.csdn.net/topics/654321"
. Document. All (" txtPWD "). The Value="https://bbs.csdn.net/topics/654321"
. Document. All (" btnLogin "). Click
End With
End Sub
CodePudding user response: