我的意思是这样的...现在我有一个网站要进行很多数据的输入..我希望数据自动输入一条又自动点提交..请问该如何做
能给出个例子看看么?谢谢
Dim Webdoc As HTMLDocument
Dim Texbody As HTMLBody
Dim Form As HTMLFormElement
Dim Rng As IHTMLTxtRange
Dim mbDontNavigateNow As Boolean
Private Sub CmdSubmit_Click()
'提交数据
With Form
.submit
End With
Text1.SetFocus
End Sub
Private Sub Form_Load()
Me.KeyPreview = True
WebBrowser1.Navigate "http://www.online.sh.cn"
End Sub
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
'将webdoc设置到被WebBrowser的Document属性返回的文挡对象中
Set Webdoc = WebBrowser1.Document
Set Texbody = Webdoc.body
Set Form = Webdoc.Forms(0)
'Set Rng = texbody.createTextRange()
Txtbt = WebBrowser1.LocationName
End Sub
Private Sub CmdSend_Click()
On Error Resume Next
'发送数据
With Form
.Item("txtCustomID").Value = Text3.Text
End With
'提交数据
'With Form
' .submit
'End With
Text1.SetFocus
End Sub