[英]How to get text from this Html on webbrowser? [VB.NET]
我正在嘗試解析此 HTML 代碼:
<textarea id="1" name="padText" class="col-xs-12 text-tab-1" style="min-height: 400px; height: 493px;">TEXT</textarea>
我正在嘗試使用許多代碼。 這是其中之一:
Dim MailElement As HtmlElement = WebBrowser2.Document.GetElementById("1")
If MailElement IsNot Nothing Then 'Necessary check: Was the element found?
RichTextBox1.Text = MailElement.GetAttribute("value")
End If
End Sub
但不幸的是它不起作用。 我也試圖解析 textarea ID,但它給了我一個簡單的“0”。
謝謝
我自己找到了解決方案。
WebBrowser1.Document.All("padText").GetAttribute("value")
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.