开发者

How to get HTML form data opened in Webkit.Net

I have a HTML5 page loaded in Webkit.Net. Now, I am trying to get the data enetered by user on HTML page.

I am trying the following code:

WebKit.DOM.Document doc1 = webKitBrowser1.Document;

WebKit.DOM.Element name1 = doc1.GetElementById("email");

string test1 = name1.GetAttribute("value");

The code is not working. Value of email element is not coming in test1.

Am I missi开发者_如何学运维ng something? Do anyone know any workaround or any other method to do this?


This is pretty much a duplicate of Get HTML input text value in webkit

The solution is

String test1 = webKitBrowser1.StringByEvaluatingJavaScriptFromString("document.getElementById('email').value");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜