iframe的区域里面我连接的是个页面,页面大于iframe的高度就会有滚动条,我就是想让滚动条在最底部。求求大神解救!!!
var bodyheight = $(window).height();
var iframeheight = bodyheight - (27 + 64 + 15);
demoIframe.height(iframeheight);
数字由你的网页上面和下面所占的高度,减除那些。
iframe是固定的 还是不行 我把代码给你看看吧!是Iframe的滚动条在最底部
<iframe runat="server" id="guanggao" src="http://tudou.com" width="100%" height="200" frameborder="no" border="0" marginwidth="0" marginheight="0" allowtransparency="yes">
</iframe>
<script src="jquery-1.4.2.js" type="text/javascript"></script>
<script type="text/javascript">
window.onload=function(){
var bodyheight = $(window).height();
alert(bodyheight);
var iframeheight = bodyheight - (27 + 64 + 15);
demoIframe.height(iframeheight);
}
</script>
<iframe name="guanggao" onload="guanggao.scrollBy(0,999999)" id="guanggao" src="C:\Users\Admin\Desktop\main.htm" width="100%" height="200" >
<script type="text/javascript"></script>
</iframe>