简体   繁体   中英

Read JavaScript variables live from website

I have a question : A website is using JavaScript I can easily see the website scripts and it's script variables since it's on the client side. My question is can I access those variables from c# and read their values live from the website ? Help would be appreciated .

Create a window form app,add a Webbrowser control and then open required url in the browser. Once it gets loaded you can you something like this to access variables and stuff.

Browser.InvokeScript("eval", new object[] { "variableName" });

I'm on the move so not able to type much

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM