此程式碼以Web填入表單資料達成回傳。﹝此處使用Google雲端空間來作範例﹞
範例Google雲端空間之提供表單:點我進入Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
WebBrowser1.Document.GetElementById("entry.1008084241").SetAttribute("value", TextBox1.Text)
WebBrowser1.Document.GetElementById("entry.716033583").SetAttribute("value", TextBox2.Text)
WebBrowser1.Document.GetElementById("login_form").InvokeMember("submit")
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://goo.gl/forms/uqaQljnmIz")
End Sub
End Class
1 則留言:
請問此段!! WebBrowser1.Document.GetElementById("login_form").InvokeMember("submit")
我依造上述打得方法 還是無法送出表單耶!!?
求解~~
PS:entry已改
張貼留言