delphi 获取某个页面所有的链接

USER  MSHTML
procedure TfrmWebEmail.btn5Click(Sender: TObject);
var
  Doc: IHTMLDocument2;
  Len: Integer;
  item: OleVariant;
  all: IHTMLElementCollection;
  I: Integer;
begin
  Doc :=  ebdwbWeb.Document as  IHTMLDocument2;
  all := Doc.links;
  Len := all.length;
  for I :=  0 to Len -1 do
  begin
    item := all.item(I, EmptyParam);
    mm1.Lines.Add(item.href) ;
  end; 
end;


你可能感兴趣的:(delphi 获取某个页面所有的链接)