Home > Net >  C # Winfrom webBrowser1 in how to capture the js code of Windows, open the url in the ()
C # Winfrom webBrowser1 in how to capture the js code of Windows, open the url in the ()

Time:10-08

C # Winfrom webBrowser1 in how to capture the js code of Windows, open the url in the ()
Such as webBrowser1 opens a page, page has a hyperlink, the hyperlink is the Windows in the js. The open (), want to capture him in the webBrowser1_NewWindow events and use the system default browser to open, how to do

CodePudding user response:

Normally only get the webbrowser & lt; body> Within the content, if js page write in & lt; head> Won't get it, you can get the page content by webRequest, then get what you want the URL

CodePudding user response:

Don't understand, can you elaborate

CodePudding user response:

You can change your idea, direct call js function, window. Open the web page
https://www.cnblogs.com/feiyuhuo/p/5474790.html

Or, you write js code, call the original js code
Js and js is interlinked, after all

CodePudding user response:

Operating the dom,
  •  Tags:  
  • C#
  • Related