How can I get the page title in WebBrowser control?

后端 未结 6 686
挽巷
挽巷 2021-02-13 20:00

How can I get the page title in a WebBrowser control when I navigate to different websites?


xmlns

xmlns:phone=\"clr-namespace:Microsoft.Phone.Contr         


        
6条回答
  •  时光取名叫无心
    2021-02-13 20:39

    I had the same problem. @Akash Kava's answer is almost correct but this is the correct javascript to read the html title:

    String title = (string)browser.InvokeScript("eval", "document.title.toString()");
    

提交回复
热议问题