
寫的自動填寫表單的功能,
現在我想command3按鈕把text2 text3的值 post提交上到 savesubmit.php
不知道如何寫代碼 麻煩高手貼下代碼或者告訴我實作思路 謝謝
Dim text() As String
Private Sub Command1_Click()
text = Split(Text1.text, "/")
wb = ""
For i = 0 To UBound(text)
If i = UBound(text) Then
wb = wb + "document.all('" + text(i) + "')"
Else
wb = wb + "document.frames('" + text(i) + "')."
End If
Web.Navigate "javascript:try{" + wb + ".value='" + Text2.text + "';};catch(e){alert('表單路徑不正確.')};function a(){};a();"
Next
End Sub
Private Sub Command2_Click()
text = Split(Text4.text, "/")
wb = ""
For i = 0 To UBound(text)
If i = UBound(text) Then
wb = wb + "document.all('" + text(i) + "')"
Else
wb = wb + "document.frames('" + text(i) + "')."
End If
Web.Navigate "javascript:try{" + wb + ".value='" + Text3.text + "';};catch(e){alert('表單路徑不正確.')};function a(){};a();"
Next
End Sub
Private Sub Command3_Click()
End Sub
Private Sub Form_Load()
Web.Navigate "http://www.zone-h.com.cn/submit.php"
End Sub
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/144987.html
標籤:網絡編程
