我想从geckofx网站获取文本值。非常感谢。 [英] I want to get a text value from a site with geckofx. Thanks s lot.
本文介绍了我想从geckofx网站获取文本值。非常感谢。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是HTML:
输入类型=textreadonly =tureclass =tp-input-text xlid =data
我尝试过:
Dim txt = GeckoWebBrowser1.Document.GetElementById(data)。 GetAttribute(value)
Me.Text = txt
this is the HTML:
input type="text" readonly="ture" class="tp-input-text xl" id="data"
What I have tried:
Dim txt = GeckoWebBrowser1.Document.GetElementById("data").GetAttribute("value")
Me.Text = txt
推荐答案
这将是C#版本,不应该太难以编码< br $>
This would be th C# version, shouldnt be too hard to trascode
string TheValue = string.Empty;
GeckoInputElement txtbox = new GeckoInputElement(geckobrowser1.Document.GetElementById("data").DomObject);
TheValue = tbox.Value;
非常感谢!!!
工作正常!!!
这是VB代码...... !!
Dim TheValue As String =
Dim txtbox = New GeckoInputElement(GeckoWebBrowser1.Document.GetElementById(data)。DomObject)
TheValue = txtbox.Value
Me.Text = TheValue
Thank you very much!!!
It works fine!!!
And here is the VB code...!!
Dim TheValue As String = ""
Dim txtbox = New GeckoInputElement(GeckoWebBrowser1.Document.GetElementById("data").DomObject)
TheValue = txtbox.Value
Me.Text = TheValue
这篇关于我想从geckofx网站获取文本值。非常感谢。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文