显示一个页面上有两个网页 [英] Displaying two web pages on one page
问题描述
我并不是说其难,但我想知道有什么办法是用于专业用途。
i am not saying its difficult but i would like to know what way is used professionally.
我要做的就是从HTML code申报内部框架和SCR分配给它,
what i do is declare iframes from html code and assign a scr to it,
,但存在的问题是
有关声明每次切换HTML code
switching the html code each time for declaration
框的大小不会改变/在它的页面调整,滚动条确实出现,但是那不是它
the size of frame does not change/ adjust with the page in it, scroll bars do appear but thats not it
所以任何建议
推荐答案
使用的onload 在iframe和重新计算/设置你的iframe的新高度和宽度。
Use the onload on your iframe and recalculate/set the new width and height on your iframe.
在新的内容加载的iframe内的onload事件被激发。
The onload is fired when new content has been loaded inside the iframe.
一些类似:<一href=\"http://stackoverflow.com/questions/2531080/dynamically-resizing-navigation-div-to-main-content\">http://stackoverflow.com/questions/2531080/dynamically-resizing-navigation-div-to-main-content
在互联网上,你可以找到一些例子中,你如何能得到的内部宽度。
这里有一个...
On the internet you can find some example how you can get the internal width. Here is one...
的http://www.infoqu.com/dev/javascript-development/getting-iframe-width-194102-1/
var the_height=document.getElementById('the_iframe').contentWindow.document.body.scrollHeight;//find the height of the internal page
var the_width=document.getElementById('the_iframe').contentWindow.document.body.scrollWidth;//find the width of the internal page
这篇关于显示一个页面上有两个网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!