MsgBox(WebBrowser1.Document.Title)
Option Strict On Public Class Form1 Public element As HtmlElement ' Element de la page WEB Public texte As String Dim adresse As String Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load adresse = "http://www.superclub.videotron.com/film.aspx?id=10044" Navigate(adresse) End Sub ' Navigates to the given URL if it is valid. Private Sub Navigate(ByVal address As String) If String.IsNullOrEmpty(address) Then Return If address.Equals("about:blank") Then Return If Not address.StartsWith("http://") And _ Not address.StartsWith("https://") Then address = "http://" & address End If Try WebBrowser1.Navigate(New Uri(address)) Catch ex As System.UriFormatException Return End Try End Sub Private Sub WebBrowser1_DocumentCompleted(sender As System.Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted element = WebBrowser1.Document.GetElementsByTagName("html").Item(0) texte = element.InnerText ' Conversion du HTML en texte RichTextBox1.Text = texte End Sub End Class
13 juil. 2014 à 19:46
<img width="30" height="30" src="/images/template/rate_ico_1.png" border="0">
il n'y a pas d'ID
je veux prendre le SRC
13 juil. 2014 à 20:00
Regarde du côté de :
document.getElementsByTagName("img")