提取网页中所有链接
uses mshtml,SHDocVw;
var
doc:IHTMLDocument2;
all:IHTMLElementCollection;
len,i:integer;
item:OleVariant;
begin
doc:=WebBrowser1 .Document as IHTMLDocument2;
all:=doc.Get_links; //doc.Links亦可
len:=all.length;
for i:=0 to len-1 do begin
item:=all.item(i,varempty); //EmpryParam亦可
memo1.lines.add(item.href +' ' +item.innertext);
end;
end;