Loading

webBrowser控件中获取元素 的class 属性值

html 代码如下:

 

<TR id="t030006" class="sr plus selected">
<TD><INPUT id=cvrgNo030006 value=030006 readOnly CHECKED type=checkbox jQuery1456994811776="96"></TD>
<TD>车辆损失险 </TD>
<TD style="TEXT-ALIGN: right"><LABEL>免赔额</LABEL> </TD>
<TD>111111</TD>
</TR>

  

获取<TR>  的class属性值,C#代码如下:

 

HtmlElementCollection tdHtmlElements = trHtmlElements[0].GetElementsByTagName("TD");
trHtmlElements[0].GetAttribute("className")

  

注意:   trHtmlElements[0].GetAttribute("className")

 

posted @ 2016-03-03 22:21  zgcy123456  阅读(1352)  评论(0编辑  收藏  举报