如何将图像附加到Webbrowser(MSHTML) [英] How append image to Webbrowser (mshtml)
本文介绍了如何将图像附加到Webbrowser(MSHTML)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private mshtml.IHTMLDocument2 docs;
docs = (mshtml.IHTMLDocument2)this.webBrowser1.Document.DomDocument;
docs.designMode =On;
docs.write("");
docs.close();
docs.writeln("<img src=\"http://www.devlounge.net/wp-content/uploads/2009/08/codeproject.jpg\" alt=\"right\" align=\"right\" title=\"right\">");
图片未显示
Picture is not dispalayed
推荐答案
您关闭文档并在下面写其他内容.关闭应该是最后一个语句.
元素img
所在的行是正确的,我对此进行了测试.
附带说明:使用属性"align
"不是很好;更好地使用CSS.
—SA
You close the document and write something else below. Close should be the last statement.
The line with the elementimg
is correct, I tested it.
A side note: using the attribute "align
" is not so good; better use CSS.
—SA
这篇关于如何将图像附加到Webbrowser(MSHTML)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文