procedure TForm1.Button2Click(Sender: TObject);
var
HtmlDocument: IHtmlDocument2;
HtmlCollection: IHtmlElementCollection;
HtmlElement: IHtmlElement;
I: Integer;
begin
HtmlDocument := WebBrowser1.Document as IHtmlDocument2;
HtmlCollection := HtmlDocument.All;
HtmlCollection := HtmlCollection.Tags('A') as IHTMLElementCollection;
for I := 0 to HtmlCollection.Length - 1 do begin
HtmlElement := HtmlCollection.Item(i, 0) as IHtmlElement;
end;
end;