【发布时间】:2013-02-28 04:40:12
【问题描述】:
问题来了
<input type='text'name='TextBox0001'/>
例如,为上面的输入插入一个值,只需使用以下代码:
foreach (HtmlElement he in webBrowser1.Document.All.GetElementsByName("TextBox0001"))
{
he.SetAttribute("value", "HI");
}
没关系,但是如果html代码如下所示,我该如何为计数器插入一个值?
<table>
<tr id='set1_row1'>
<td> <input type='text'name='counter'></td>
</tr>
<tr id='set1_row2'>
<td> <input type='text'name='counter'></td>
</tr>
</table>
</table>
我正在使用 c# webBrowser。
【问题讨论】: