他的显示只有那么一点的,但是下面还有很多内容的。
onload=document.all('Showme').height=Showme.document.body.scrollHeight
思路是:把要显示的内容的高度给iframe的高度
加载的页面跨域了没有?没有可以用js设置iframe的高度,跨域就没搞了
<iframe onload="resetHeight(this)" name="abc" width="100%"></iframe>
<a href="menu.html" target="abc">mehu.html</a>
<script>
function resetHeight(ifr) {
ifr.style.height = 'auto';
var doc = ifr.contentWindow.document;
ifr.style.height = Math.max(doc.body.scrollHeight, doc.documentElement.scrollHeight) + 'px';
}
</script>