System.Windows.Forms.HtmlDocument doc = this.webBrowser1.Document;
//简写为 HtmlDocument doc = webBrowser1.Document;
if (doc != null)
{ HtmlElement tableElem = doc.GetElementById("d3");
HtmlElementCollection elemColl = null;
tableElem.InnerText; elemColl = doc.GetElementsByTagName("META");
String nameStr = elemColl .GetAttribute("name");
}
|
|