webbrowser 对多个Frames网页的链接的判断.并点击要怎么写???(100分)

A

allen72

Unregistered / Unconfirmed
GUEST, unregistred user!
多个frames网页的代码可以
Memo1.Text:= wb.oleobject.document.
documentelement.document.frames.item(i).document.documentelement.OuterHtml;

一个frames的点链接可以:
doc:=webbrowser1.Document as IHTMLDocument2;
all:=doc.Get_links;
len:=all.length;
for l:=0 to len-1 do
begin
item:=all.item(l,varempty);
if item.href= 'http://www.yahoo.com' then
item.click
end;

多frames网页的链接怎么找出来.怎么click 它???
 
这个问题解决了..换个问题..在用webbrowser自动填表时.
有时会弹出象'Security Alert'这类的窗口,要你按Y/N ,直接关闭它不行!
.一定要按[YES] button 才能提交, 怎么办???
 
晕..这个问题也解决了..再找个问题..:
EmbeddedWB 控件 和 delphi自己的webbrowser 相比 有什么优点??? 哪儿就好的说明?或实例
 
能不能把你的这段代码贴出来看看,或发给我看看,我也在找这个。
chenboby@sina.com
 

for i := 0 to WB.OleObject.Document.documentelement.document.frames.item(0).Document.Links.length-1 do
begin
if pos('条件',WB.OleObject.Document.documentelement.document.frames.item(0).Document.Links.Item(i).Href)>0 then
begin
WB.OleObject.Document.documentelement.document.frames.item(0).Document.Links.Item(i).click;
break;
end;
end;
 
item(0)是什么?怎样确定其中的0值,我不是很懂,你能不能把代码写得详细些,谢谢。
 
allen72大哥:
“在用webbrowser自动填表时.有时会弹出象'Security Alert'这类的窗口,要你按Y/N ,直接关闭它不行!
.一定要按[YES] button 才能提交, 怎么办??? ”
这个问题是怎么解决的,可不可以告诉我。
liujinwu@21cn.com
谢谢了。
 
hi你这个方法能把所有frame的连接取到吗?
偶看不行吧
只能取第一个frame下的连接
第二个的就会报错了
 
“在用webbrowser自动填表时.有时会弹出象'Security Alert'这类的窗口,要你按Y/N ,直接关闭它不行!
.一定要按[YES] button 才能提交, 怎么办??? ”
这个问题是怎么解决的,可不可以告诉我。
 
顶部