System.Collections.IEnumerator ee = myTable.rows.GetEnumerator();
while(ee.MoveNext())
{
HTMLTableRow row = (HTMLTableRow) ee.Current;
IHTMLElementCollection cells = row.cells;
System.Collections.IEnumerator ee2 = cells.GetEnumerator();
while (ee2.MoveNext())
{
IHTMLTableCell aCell = (IHTMLTableCell) ee2.Current;
IHTMLElement el = (IHTMLElement)aCell;
Console.WriteLine( "Cell=" + row.rowIndex + "," + aCell.cellIndex
+ "..."+ el.innerText);
}
}
http://www.c-sharpcorner.com/Code/2004/Jan/IntegrateThroughWebInterface.asp
中国人写的哦,而且是c-sharpcorner里唯一一篇相关文章,俺觉得大哥很牛:)
while(ee.MoveNext())
{
HTMLTableRow row = (HTMLTableRow) ee.Current;
IHTMLElementCollection cells = row.cells;
System.Collections.IEnumerator ee2 = cells.GetEnumerator();
while (ee2.MoveNext())
{
IHTMLTableCell aCell = (IHTMLTableCell) ee2.Current;
IHTMLElement el = (IHTMLElement)aCell;
Console.WriteLine( "Cell=" + row.rowIndex + "," + aCell.cellIndex
+ "..."+ el.innerText);
}
}
http://www.c-sharpcorner.com/Code/2004/Jan/IntegrateThroughWebInterface.asp
中国人写的哦,而且是c-sharpcorner里唯一一篇相关文章,俺觉得大哥很牛:)
table要取里面每个表格的数据
只能按照楼上的方式两层循环来做