var
do
c: IHTMLDocument2;
all: IHTMLElementCollection;
len, i: integer;
item: OleVariant;
begin
ListBox1.clear;
do
c := WebBrowser1.Document as IHTMLDocument2;
all :=do
c.Get_links;
len := all.length;
for i := 0 to len - 1do
begin
item := all.item(i, varempty);
ListBox1.Items.Add(item.innertext + '----------' + item.href);
end;
end;