Private Sub Command1_Click ()
WebBrowser1. Document. Getelementbyid (" submitBtn "). Click
End Sub
Private Sub Command2_Click ()
Dim hyvDoc hyvTag, zyvDoc zyvTag, hzvDoc, hzvTag, zjvDoc, zjvTag, flvDoc, flvTag, gzvDoc, gzvTag, dzvDoc, dzvTag, dhvDoc, dhvTag, xlvDoc xlvTag, '
Dim I As an Integer, ii As Integer
The Set hyvDoc=WebBrowser1. Document
For I=0 To hyvDoc. All. The length - 1
If UCase (hyvDoc. All (I). TagName)="SELECT" Then
The Set hyvTag=hyvDoc. All (I)
If hyvTag. Type="select - one" Then
If hyvTag. Id="marriagetype" Then hyvTag. Value=https://bbs.csdn.net/topics/21
End the If
End the If
Next I
Professional
'The Set zyvDoc=WebBrowser1. Document
For I=0 To zyvDoc. All. The length - 1
If UCase (zyvDoc. All (I). TagName)="SELECT" Then
The Set zyvTag=zyvDoc. All (I)
If zyvTag. Type="select - one" Then
If zyvTag. Id="occupation" is Then zyvTag. Value=https://bbs.csdn.net/topics/0
End the If
End the If
Next I
'
the masterThe Set hzvDoc=WebBrowser1. Document
For I=0 To hzvDoc. All. The length - 1
If UCase (hzvDoc. All (I). TagName)="SELECT" Then
The Set hzvTag=hzvDoc. All (I)
If hzvTag. Type="select - one" Then
If hzvTag. Id="function" is Then hzvTag. Value=https://bbs.csdn.net/topics/2
End the If
End the If
Next I
'separation
The Set flvDoc=WebBrowser1. Document
For I=0 To flvDoc. All. The length - 1
If UCase (flvDoc. All (I). TagName)="SELECT" Then
The Set flvTag=flvDoc. All (I)
If flvTag. Type="select - one" Then
If flvTag. Id="separatetype" Then flvTag. Value=https://bbs.csdn.net/topics/8
End the If
End the If
Next I
'work
The Set gzvDoc=WebBrowser1. Document
For I=0 To gzvDoc. All. The length - 1
If UCase (gzvDoc. All (I). TagName)="INPUT" Then
The Set gzvTag=gzvDoc. All (I)
If gzvTag. Type="text" Then
If gzvTag. Id="jobunit" Then gzvTag. Value="https://bbs.csdn.net/topics/"
End the If
End the If
Next I
'address
The Set dzvDoc=WebBrowser1. Document
For I=0 To dzvDoc. All. The length - 1
If UCase (dzvDoc. All (I). TagName)="INPUT" Then
The Set dzvTag=dzvDoc. All (I)
If dzvTag. Type="text" Then
If dzvTag. Id="jobaddress" Then dzvTag. Value="https://bbs.csdn.net/topics/"
End the If
End the If
Next I
'phone number
The Set dhvDoc=WebBrowser1. Document
For I=0 To dhvDoc. All. The length - 1
If UCase (dhvDoc. All (I). TagName)="INPUT" Then
The Set dhvTag=dhvDoc. All (I)
If dhvTag. Type="text" Then
If dhvTag. Id="phone" Then dhvTag. Value="https://bbs.csdn.net/topics/"
End the If
End the If
Next I
'degree
The Set xlvDoc=WebBrowser1. Document
For I=0 To xlvDoc. All. The length - 1
If UCase (xlvDoc. All (I). TagName)="SELECT" Then
The Set xlvTag=xlvDoc. All (I)
If xlvTag. Type="select - one" Then
If xlvTag. Id="edulevel" Then xlvTag. Value=https://bbs.csdn.net/topics/60
End the If
End the If
Next I
'id
The Set zjvDoc=WebBrowser1. Document
For I=0 To zjvDoc. All. The length - 1
If UCase (zjvDoc. All (I). TagName)="SELECT" Then
The Set zjvTag=zjvDoc. All (I)
If zjvTag. Type="select - one" Then
If zjvTag. Id="cardtype" Then zjvTag. Value=https://bbs.csdn.net/topics/1
End the If
End the If
Next I
End Sub
Private Sub form_load ()
WebBrowser1. Navigate "http://10.10.202.135/cmis/Populate_add.action?"
End Sub
CodePudding user response:
See this layout, has no desire to read itCodePudding user response:
The Set hyvDoc=WebBrowser1. DocumentThe Set flvDoc=WebBrowser1. Document
The Set zjvDoc=WebBrowser1. Document
.
See a pile of this, I dizzy...
Only in the event of an WebBrowser1_documentcomplete Settings can be a
Such as: Set myDoc=WebBrowser1. Document
At the back of the hyvDoc flvDoc zjvDoc... Use the mydoc can
CodePudding user response:
In addition, all know id, there is no need to use circulation + tagname judgment, this directly withMydoc. All. The item (" jobunit "). The value="https://bbs.csdn.net/topics/"
Mydoc. All. The item (" phone "). The value="https://bbs.csdn.net/topics/"
.
CodePudding user response: