To steeven:我在我的系统上重复了你的步骤,不过我没有重现你所说的问题。我在我的WinForm上访了一个AxWebBrowser控件以及两个按钮,通过这两个按钮来清空和写入webBrowser里面的document:private void button1_Click(object sender, System.EventArgs e)
{
object url="about:blank";
object nothing=System.Reflection.Missing.Value;
this.axWebBrowser1.Navigate2(ref url,ref nothing,ref nothing,ref nothing,ref nothing);
}private void button4_Click(object sender, System.EventArgs e)
{
((mshtml.IHTMLDocument2)this.axWebBrowser1.Document).write("<html><body>aaaa</body></html>");
}在这段程序里面,按button4可以插入内容,按button1可以清空内容。建议您再尝试一下,如果错误仍然存在,那么需要看一下错误是否由其他部分的代码引起。Hogwarts - S(u)ddenly dis@ppeared...

本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。