标签:
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>
标签:
原文地址:http://www.cnblogs.com/csharphuang/p/4189930.html