我正在开发一个 BHO 来拒绝访问被禁止的网站。因此,当我找到某个 URL 时,我只需使用以下代码打开一个 iframe:
Document:= IE.Document as IHTMLDocument2;
iFrame:= Document.createElement('iframe');
iFrame.setAttribute('src', 'denied.html', 0);
iFrame.setAttribute('position', 'fixed', 0);
iFrame.style.width:= '100%';
iFrame.style.left:= '0px';
iFrame.style.top:= '0px';
iFrame.style.border:= '0px';
iFrame.style.height:= '100%';
(Document.body as IHTMLDomNode).appendChild(iFrame as IHTMLDomNode);
但是这段代码只是将 iframe 打开到网站末尾的一个小空间中。如何将整个网站与我的 iframe 内容重叠?