页面里面的 <iframe frameborder="0" src="http://www.163.com" width="1000px" height="1000px" scrolling="no"></iframe> 要控制里面的www.163.com 因为是跨域,而且我试了很多办法了,说明一点是用delphi 怎么都不行,一般报错为拒绝访问,这个也许不算问题,但是本人新手,诚心的像大家请教了,跨域在网上的质料真的好少啊。。
谢谢 大牛看见了,来指点迷津~
谢谢大家,我分不多,当然希望会的朋友加我QQ指导,我也许会以其他方式感谢您~~
1198102132
谢谢 大牛看见了,来指点迷津~
谢谢大家,我分不多,当然希望会的朋友加我QQ指导,我也许会以其他方式感谢您~~
1198102132
你程序怎么会把163放iframe里?
var
isp : IServiceProvider;
begin
Result := nil;
if not Assigned(ADsp) then Exit;
isp := ADsp as IServiceProvider; isp.QueryService(IID_IWebBrowserApp, IID_IWebBrowser2, Result);
end;var
doc : IHTMLDocument2;
wd : IHTMLWindow2;
bw : IWebBrowser2;
begin
.....
//处理frame中的情况 frame=...
vframe := doc.frames.item(v);
if Assigned(vframe) then
begin
vframe.QueryInterface(IID_IHTMLWindow2, wd);
if Assigned(wd) then
try
bw := HtmlWindowToHtmlWebBrowser(wd);
if Assigned(bw) then
doc := bw.Document as IHTMLDocument2;
wd := nil;
except
end;
vframe := nil;
end;
.....
end;