找了老半天才找到,给分吧!
增加uses mshtml
var
Document : IHtmlDocument2;
Link : IHTMLElement;
StrLinks : string;
i : integer; begin
Document := WebBrowser1.Document as IHTMlDocument2;
for i := 0 to Document.Links.Length - 1 do
begin
Link := Document.Links.Item(i, 0) as IHTMLElement;
StrLinks := Link.ToString + #13#10;
ShowMessage(StrLinks);
end;
end;
增加uses mshtml
var
Document : IHtmlDocument2;
Link : IHTMLElement;
StrLinks : string;
i : integer; begin
Document := WebBrowser1.Document as IHTMlDocument2;
for i := 0 to Document.Links.Length - 1 do
begin
Link := Document.Links.Item(i, 0) as IHTMLElement;
StrLinks := Link.ToString + #13#10;
ShowMessage(StrLinks);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货