本文介绍了WPF的web浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 您好,我想通过网络登录Facebook b< g class =" gr_ gr_5 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace"数据-GR-ID =" 5英寸ID = 的问题。Hello, I want to login facebook via web b<g class="gr_ gr_5 gr-alert gr_spell gr_inline_cards gr_run_anim ContextualSpelling ins-del multiReplace" data-gr-id="5" id="5">rowser</g> in WPF application but there's a problem.图片链接:https://i.hizliresim.com/JQAJ4W.pngImage Link : https://i.hizliresim.com/JQAJ4W.png推荐答案如果您使用WPF webBrowser而不是Winform。If you use WPF webBrowser not Winform.您可以尝试将文档类型转换为System.Windows.Forms.HtmlDocument,如下代码所示。You can try to convert the type of Document to System.Windows.Forms.HtmlDocument as following code. System.Windows.Forms.HtmlDocument document = (System.Windows.Forms.HtmlDocument)webBrowser.Document; document.getElementById("email");您还可以 将  Document的类型转换为mshtml.HTMLDocument,如下代码所示。You can also  convert the type of Document to mshtml.HTMLDocument as following code.mshtml.HTMLDocument document = (mshtml.HTMLDocument)WebBrowser1.Document;mshtml.IHTMLElement textArea = document.getElementById("email");   最好的问候, Best Regards, Bob 这篇关于WPF的web浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-14 21:02