uses mshtml
//得到所有图片链接
procedure TForm1.Button1Click(Sender: TObject);
var
doc:IHTMLDocument2;
all:IHTMLElementCollection;
len,i:integer;
item:IHTMLElement;
vAttri:Variant;
begin
memo1.Lines.Clear;
//获得Webbrowser对象中的文档对象
doc:=webbrowser1.Document as IHTMLDocument2;
//获得文档中所有的HTML元素集合
all:=doc.Get_all;
len:=all.Get_length;
for i:=0 to len-1 do begin
item:=all.item(i,varempty) as IHTMLElement;
if item.Get_tagName = 'IMG'then begin
vAttri:=item.getAttribute('SRC',0);
memo1.Lines.Add(vAttri);
end;
end;
end;