iframe去滚动条
<iframe name="myFrame" id="myFrame" frameborder="0" src="tab.action" style="margin:0 auto;width:100%;height:100%;" scrolling="no"></iframe>
iframe自适应屏幕大小
function resetIframeScreen(){ var myFrame= document.getElementById("myFrame"); var bheightT = document.documentElement.clientHeight; myFrame.style.width = ‘100%‘; myFrame.style.height = (bheightT - 50) + ‘px‘; } resetIframeScreen(); window.onresize=function(){ resetIframeScreen(); };
时间: 2024-10-06 13:26:52