WebBrowse中如何实现找出所有链接和其对应的简介!例如:用google搜索Delphi,会出现很多信息!
在页面中我以找出所有连接,不知怎么找出连接对应的内容介绍?
以及如何能较好的实现番页?

解决方案 »

  1.   

    获取WebBrowser里面所有连接的函数
    procedure TForm1.GetAllLinks;
    var
      doc:IHTMLDocument2;
      all:IHTMLElementCollection;
      len,i:integer;
      item:OleVariant;
    begin
        doc:=WebBrowser1.Document as IHTMLDocument2;
        all:=doc.Get_links
        len:=all.length;
        for i:=0 to len-1 do begin
          item:=all.item(i,varempty);
        memo1.lines.add(item.href);
      end;
    end;