Reputation: 53
I have a javascript function:
function getData(){
return document.getElementById("xx").value;
}
I use HtmlElement
to append code in html and use webbrowser invokescript
to run function getData()
.
I want to get return value of getData()
and show it on messageBox.
Upvotes: 3
Views: 5647
Reputation: 1881
You can simply assign it into a string variable
String str = doc.InvokeScript("getData").ToString();
Upvotes: 6