在此基础上加强
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;//
namespace WebBrowser网页操作
{
public class Element
{
//根据Name获取元素
public HtmlElement GetElement_Name(WebBrowser wb,string Name)
{
HtmlElement e = wb.Document.All[Name];
return e;
}
//根据Id获取元素
public HtmlElement GetElement_Id(WebBrowser wb, string id)
{
HtmlElement e = wb.document.getElementByIdx(id);
return e;
}
//根据Index获取元素
public HtmlElement GetElement_Index(WebBrowser wb,int index)
{
HtmlElement e = wb.Document.All[index];
<