关于iframe自动伸缩的问题,小弟坐等答案,希望各路高手多加指点,谢谢了! 问题说明: 我的一个index.aspx页面中包行了3个iframe 其中左边和右边的iframe的高度是不变的,只有中间那个iframe的高度要适应不同页面的高度,但他变高的时候不能缩回去。望知道的同行给个解决方案,在这小弟先谢谢了。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <IFRAME id="main" name="main" marginWidth="10" marginHeight=0 src="iframe.php" frameBorder=0 width=100% scrolling=no height=25 onload="this.height=this.contentWindow.document.body.scrollHeight"></IFRAME> 就是中间的那个iframe里面套的页面变高之后,再点击别的没那么高的页面它不会缩回去。。 <iframe marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" id="frameCenter" scrolling="no" src="frame.htm" onload="style.width=this.contentWindow.document.all.formTableID.offsetWidth;"+"style.height=this.contentWindow.document.all.formTableID.offsetHeight"></iframe>formTableID是你调用那二个页面最外层的table的id //自动适应iframe的高度适用IE FF function SetWinHeight(obj){ var win=obj; if (document.getElementById) { if (win && !window.opera) { if (win.contentDocument && win.contentDocument.body.offsetHeight) win.height = win.contentDocument.body.offsetHeight; else if(win.Document && win.Document.body.scrollHeight) win.height = win.Document.body.scrollHeight; } }} 倒计时在页面不停刷新问题,按F5在刷新一次就正常了, URI编码问题 动态添加FildUpLoad控件的问题!请高手赐教!! 想做一个可重用的用户控件 ASP.NET中如何让DataGrid控件的其中一列显示为CheckBox asp.net 打印命令 急问:动态加载的控件是不是只能加载,不能编辑阿? SiteMapPath + SiteMapNode 问题 关于先显示问题 极具魅力的题目!千万不能错过哦!高手才行啊!! Eval()、XPath() 和 Bind() 这类数据绑定方法只能在数据绑定控件的上下文中使用 vss添加项目问题
id="frameCenter" scrolling="no" src="frame.htm"
onload="style.width=this.contentWindow.document.all.formTableID.offsetWidth;"
+"style.height=this.contentWindow.document.all.formTableID.offsetHeight"></iframe>formTableID是你调用那二个页面最外层的table的id
function SetWinHeight(obj)
{
var win=obj;
if (document.getElementById)
{
if (win && !window.opera)
{
if (win.contentDocument && win.contentDocument.body.offsetHeight)
win.height = win.contentDocument.body.offsetHeight;
else if(win.Document && win.Document.body.scrollHeight)
win.height = win.Document.body.scrollHeight;
}
}
}