您好,我正在使用此代码:
private void Form1_Load(object sender, EventArgs e)
{
webBrowser1.Navigate("about:blank");
HtmlDocument doc = webBrowser1.Document;
doc.Write("<b><i>My Name</i> is Not </b> Khan.<b><i>My Name</i> is Not </b> Khan.<b><i>My Name</i> is Not </b> Khan.<b><i>My Name</i> is Not </b> Khan.");
}
private void button1_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("about:blank");
HtmlDocument doc = webBrowser1.Document;
doc.Write("<b><i>My Name</i> is Not </b> Khan.<b>");
}
但是当我点击按钮时,webBrowser1 显示为空白。