K
kunge
Unregistered / Unconfirmed
GUEST, unregistred user!
var
doc:IHTMLDocument2;
framewin2:IHtmlWindow2;
i,j:integer;
item1,m:OleVariant;
item:IDispatch;
tstr:string;
mf:IHtmlFramesCollection2;
begin
doc:=WebBrowser1.Document as IHTMLDocument2;
mf:=doc.get_frames;
Memo1.Lines.Add(IntToStr( mf.length));
for i:=0 to mf.length-1 do
begin
m:=i;
item:=mf.item(m);
item.QueryInterface(IID_IHTMLWindow2,framewin2);
if assigned(framewin2) then
Memo1.Lines.Add(IntToStr(framewin2.document.links.length)) ;
end;
end;
为什么提示拒绝呢
doc:IHTMLDocument2;
framewin2:IHtmlWindow2;
i,j:integer;
item1,m:OleVariant;
item:IDispatch;
tstr:string;
mf:IHtmlFramesCollection2;
begin
doc:=WebBrowser1.Document as IHTMLDocument2;
mf:=doc.get_frames;
Memo1.Lines.Add(IntToStr( mf.length));
for i:=0 to mf.length-1 do
begin
m:=i;
item:=mf.item(m);
item.QueryInterface(IID_IHTMLWindow2,framewin2);
if assigned(framewin2) then
Memo1.Lines.Add(IntToStr(framewin2.document.links.length)) ;
end;
end;
为什么提示拒绝呢