delphi 遍历网页中的图片

var
doc: IHtmlDocument2;
i: Integer;
s: String;
begin
//iFile := WebBrowser1.Document as IPersistFile;
//iFile.Save('F:\tt.mht', False);
doc :
= WebBrowser1.Document as IHtmlDocument2;
if doc.images.length = 0 then exit;
Memo1.Clear;
for i := 0 to doc.images.length-1 do
with (doc.images.item(i,null) as IHTMLImgElement) do begin
s :
= name;
s :
= s + ';' + href;
s :
= s + ';' + src;
s :
= s + ';' + mimeType;
s :
= s + ';' + dynsrc;
s :
= s + ';' + vrml;
Memo1.Lines.Add(s);
end;
end;
posted @ 2011-03-21 09:25  许明吉博客  阅读(1127)  评论(0编辑  收藏  举报