iframe 전체 화면 표시

1623 단어 iframe
window.onload = function() {
var winWidth = parseInt(document.documentElement.clientWidth);//
var winHeight = parseInt(document.documentElement.clientHeight);//
// iframe
document.getElementById("frmDialog").width = winWidth + "px";
document.getElementById("frmDialog").height = winHeight + "px";
// iframe
//document.getElementById("frmDialog").width = (winWidth / 2) + "px";
//document.getElementById("frmDialog").height = (winHeight / 2) + "px";
};

<iframe id="frmDialog" src="http://www.163.com" frameborder="0" scrolling="auto" align="top" marginheight="0" marginwidth="0"></iframe>
---------------------------------------------------------
iframe


OpenExcelInIframe function resize(){ var winWidth = parseInt(document.documentElement.clientWidth); var winHeight = parseInt(document.documentElement.clientHeight); document.getElementById("frmDialog").width = winWidth + "px"; document.getElementById("frmDialog").height = winHeight + "px"; }; onload=function(){ resize(); }; onresize=function(){ resize(); };

좋은 웹페이지 즐겨찾기