开发者

Accessing html form input type=text using jquery from a windows forms webbrowser-control

I have two elements on my Windows Forms application:

Webbrowser-Control

Button

Inside of the webbrowser-control I show a very simple html-form with two input type=text. I press the button and get access to both text fields.

Last year at the Qt developer conference t开发者_JS百科here was a quite good presentation: http://labs.trolltech.com/blogs/2009/04/17/jquery-and-qwebelement/

void highlightAllLinks() {
    QString code = "$('a').each( function () { 
                        $(this).css('background-color', 'yellow') 
                    })";
    view->page()->mainFrame()->evaluateJavaScript(code);
}

But I have to do this with .net and Windows Forms. Anyone knowing a good tutorial?


See if this link helps, it's a similar question to yours --> Using jQuery in WinForms desktop app?

EDIT:

I actually found code in another, better link: How to inject Javascript in WebBrowser control?


Found something:
http://metadeveloper.blogspot.com/2008/10/mashing-up-jquery-and-windows-forms.html

Quite easy to understand - really nice!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜