private void webbrowser1_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e)
{
HTMLDocument htmlDoc = webbrowser1.Document as HTMLDocument;
var head = htmlDoc.getElementById("div1");
head.setAttribute("style","display:none;");
}
其中webbrowser1是你的webBrowser控件名
在DocumentComplete事件中写代码:
webbrowser1.Document.getElementById("id1").SetAttribute("style","display:none;");