开发者

How to get the return value of a JavaScript function/Object on Webbrowser Control

开发者_如何学JAVA

How can i can get/capture the value of a JavaScript object on the page rendered in a webbrowser control, or alternatively capture the return value of a function?

The only example I saw is the following in delphi. Looking for a better solution in C#

http://www.delphidabbler.com/articles?article=21


You need the InvokeScript call of HtmlDocument. MSDN documentation on ObjectForScripting


One piece of info missing is what you want to capture it to. I personally use Firefox with Firebug. It allows you to use the Javascript command console.log(object); to log an object to the Firebug console. Same applies for function return values, console.log(myFunc());.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜