<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>子窗口全屏</title>
</head>
<body>
<input id="windowFullScreen" type="button" value="全屏" />
<script>
window.οnlοad=function(){
document.getElementById("windowFullScreen").οnclick=function(){
/*设置重新打开的页面
* toolbar 不显示浏览器的工具栏
* location 不显示地址字段
* menubar 不显示菜单栏
* directories 不显示目录添加按钮
* scrollbars 窗体中内部超出窗口可视范围时不存在滚动条
* */
var win=window.open("child.html","_blank","resizable=yes;status=yes;toolbar=no;location=no;menubar=no;directories=no;scrollbars=no;");
win.moveTo(0,0);
win.resizeTo(screen.availWidth,screen.availHeight);//设置新打开窗口的宽、高
}
}
</script>
</body>
</html>
javascript设置iframe里子窗口全屏
最新推荐文章于 2024-09-23 17:26:55 发布