浮动框架:
<div style=" width:100%;"> <iframe frameborder="0" width="100%" id="Content" name="Main" src="OrderTab.aspx?guid=<%=Request.QueryString["guid"].ToString() %>" ></iframe> </div>
子页:
在body标签的onload事件中执行:
var AdapterIframe = function() { var iframeObj = parent.document.getElementById("Content"); iframeObj.height = iframeObj.contentWindow.document.documentElement.scrollHeight; iframeObj.width = iframeObj.contentWindow.document.documentElement.scrollWidth; }