delphi WebBrowser1遍历网页中的图片


本文整理自网络,侵删。

 
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; 

相关阅读 >>

Delphi copy 从字符串中复制指定范围中的字符

Delphi 查看 dll 的输出函数列表

Delphi 服务器与客户端的时间同步

Delphi_关于null,nil

Delphi 简单判断程序30秒没有键盘和鼠标动作

Delphi替换字符串中的单引号

Delphi 将字符串转换成 utf8 编码的函数

Delphi xe sha1

Delphi android实例-读取设备联系人(xe8+小米2)

Delphi 获取指定当前目录下指定文件扩展名所有文件

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...