请问VB如何获取网页中文本框内容
请问大侠,我用WebBrowser1控件打开了网页,网页上面有文本框,文本框中有内容,如何用VB点击按钮的时候获取网页中文本框内容到Text中呢
Private WithEvents HtmlDocument As MSHTML.HtmlDocument Private WithEvents HtmlElement As MSHTML.HTMLButtonElement Private Sub Form_Load() WebBrowser1.Navigate "www." End Sub Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) With WebBrowser1 Set HtmlDocument = .Document Set HtmlElement = HtmlDocument.getElementById("scbar_txt") End With MsgBox HtmlElement.Value Set HtmlElement = Nothing Set HtmlDocument = Nothing End Sub