[問題] 取得超連結文字

看板C_Sharp作者 (fongse)時間16年前 (2009/05/01 11:09), 編輯推噓1(100)
留言1則, 1人參與, 最新討論串1/1
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { HtmlElementCollection links = this.webBrowser1.Document.Links; foreach (HtmlElement link in links) { MessageBox.Show(link.GetAttribute("href")); } } 這樣子寫可以取得超連結 但以下情況 <a href="">文字</a> 但是在不使用正規的方式下,超連結的文字部分如何取得? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 220.140.102.53 ※ 編輯: fongse 來自: 220.140.102.53 (05/01 11:11) ※ 編輯: fongse 來自: 220.140.102.53 (05/01 11:11)

05/01 11:31, , 1F
用innerHTML or innerTEXT 不過沒試過
05/01 11:31, 1F
文章代碼(AID): #19-cW5xe (C_Sharp)