在Webbrowser C#中获取跨度标记文本 [英] Get Span Tag Text In Webbrowser C#
本文介绍了在Webbrowser C#中获取跨度标记文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hi
我想获取(无效的用户名或密码)来自Webbrowser的消息本文档中的代码:
Hi
I Want To Get (invalid username or password) Message From Webbrowser In This Document Code :
<span xmlns="http://www.w3.org/1999/xhtml" id="c_116" style="color:#d98180;font-family:sans-serif;font-size:11px;white-space:nowrap;">invalid username or password</span>
webBrowser1.Document .GetElementById(c_116)?如何获取无效的用户名或密码?
webBrowser1.Document.GetElementById("c_116") ? How To Get invalid username or password ?
推荐答案
您好,
试试这个:
Hi,
Try this:
var text = document.getElementById('span_id').innerHTML;
这篇关于在Webbrowser C#中获取跨度标记文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文