首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

怎么获取链接的颜色【已经找到该链接】

2012-05-24 
如何获取链接的颜色【已经找到该链接】下面是VB.NET 2008的代码Dim hc As HtmlElementCollection WebBrows

如何获取链接的颜色【已经找到该链接】
下面是VB.NET 2008的代码


  Dim hc As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("a")
  For i As Int32 = 0 To hc.Count
  If hc(i).InnerText = TextBox2.Text & "-" & TextBox3.Text Then
  MsgBox(hc(i).GetAttribute("style"))
  End If
  Next


网页上面有,返回的不是这样的字符串



<a href="javascript:SetDate(2012,5,9)" style="color:red">5-9(三)</a>

[解决办法]
webbROWSER就可以的!

热点排行