C# 如何获取iframe内部标记";textarea";在webbrowser控件c中#
我正在尝试在文本框中获取完整的iframeC# 如何获取iframe内部标记";textarea";在webbrowser控件c中#,c#,winforms,webbrowser-control,C#,Winforms,Webbrowser Control,我正在尝试在文本框中获取完整的iframe <textarea id="embed_code" spellcheck="false" onclick="this.select()" style="opacity: 1;"> <iframe frameborder="0" width="480" height="270" src="http://www.dailymotion.com/embed/video/x18adty"></iframe> <
<textarea id="embed_code" spellcheck="false" onclick="this.select()" style="opacity: 1;">
<iframe frameborder="0" width="480" height="270" src="http://www.dailymotion.com/embed/video/x18adty"></iframe>
</textarea>
您是否试图在文本区域中将iframe显示为文本?如果是这样,html将其转义(最重要的是转换
),我正试图复制这个dailymotion.com/embed/video/x18adty“>,以便在我的表单文本框中显示它HtmlDocument doc = webBrowser1.Document; textBox5.Text = doc.GetElementById("video_title").InnerText; HtmlElement body = doc.GetElementById("embed_code"); textBox3.Text = body.GetElementsByTagName("iframe").ToString();