Delphi WebBrowser通过遍历Id查找元素是否存在


本文整理自网络,侵删。

 
{Delphi: }
 
function FindIds(Aid:String):Boolean; 
var 
  Document :Variant; 
  Id:Integer; 
begin 
 Result   := False; 
 Document := WebBrowser.OleObject.Document.getElementsByTagName('*'); 
 for Id := 0 to Document.Length-1 do 
 begin 
  if Document.item(Id).id = Aid then 
  begin 
   Result := True; 
   Exit; 
  end; 
 end; 
end; 

相关阅读 >>

Delphi gridpanel percent百分比设置

Delphi datasnap 上传/下载大文件(本demo以图传片文件为例)

Delphi获取java时间戳

Delphi 比较完整的listview1用法

Delphi clipboard 截图后将图片数据复制到剪贴板

Delphi 调用viewer-windows10 图像浏览器

Delphi开发linux包

Delphi自动提交网页表单和获取框架网页源码

Delphi 锁定鼠标移动范围

Delphi 2010 unicode

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



打赏

取消

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

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

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

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

评论

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