proxy.html放在域名A页面,域名A页面中的iframer的id命名是iFrame,和域名B里面的Js里面的变量对应

<iframe style="HEIGHT: 560px" id="iFrame" framespacing="0" height="560" marginheight="0" border="0" src="http://www.uzuz8.com/post/425.html"  frameborder="0" width="683" marginwidth="0" scrolling="no"></iframe>

IFrameJS.js放在域名B下面,在域名A页面嵌入的域名B的页面中引用它,即可使域名B该页面高度自适应。

通俗一点就是,我在http://www.uzuz8.net/页面中通过iframe引用了http://www.uzuz8.com/post/425.html,要想让http://www.uzuz8.com/post/425.htmlhttp://www.uzuz8.net/页面中高度自适应,就把proxy.html放在http://www.uzuz8.net/下面,把http://www.uzuz8.net/页面中iframe的id命名为iFrame,并在http://www.uzuz8.com/post/425.html引用IFrameJS.js即可。

 proxy.html和IFrameJS.js下载:/Files/chendaoyin/iframe跨哉高度自适应.7z

posted on 2012-09-19 15:08  晓晨  阅读(415)  评论(0编辑  收藏  举报