单页式全屏
<!DOCTYPE html>
<html>
<HEAD>
<title>单页式全屏</title>
<meta charset="UTF-8">
<script language="javascript">
//ps:这是实现屏幕最大化 方法一
function openwin_max(url){
var scrWidth=screen.availWidth;
var scrHeight=screen.availHeight;
var self=window.open(url,"PowerBOS","resizable=1");
self.moveTo(-4,-4);
self.resizeTo(scrWidth+9,scrHeight+9);
}
// ps:这是实现窗口最大化 方法二
function openwin_full(url) {
var scrWidth=screen.availWidth;
var scrHeight=screen.availHeight;
var opt='top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no,fullscreen=1';
var self = window.open(url, "aaaa", opt);
//var self=window.open(url,"PowerBOS","resizable=1");
self.moveTo(0,0);
self.resizeTo(scrWidth,scrHeight);
}
</script>
<script>
window.moveTo(0,0);
window.resizeTo(screen.availWidth,screen.availHeight);
window.outerWidth=screen.availWidth;
window.outerHeight=screen.availHeight;
//这是实现屏幕最大化! 方法三
function fullScreen(){
var opt='top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no';
//window.open(document.location, 'aaa', 'fullscreen')
window.open(document.location, "aaa", opt);
}
</script>
</head>
<body>
<input type="BUTTON" value="全屏一" onClick="openwin_max(document.location)">
<br />
<input type="BUTTON" value="全屏二" onClick="openwin_max(document.location)">
<br />
<input type="BUTTON" value="全屏三" onClick="fullScreen()">
<p style="font-size:16px; text-indent:2em; ">全屏1</p>
<p style="font-size:16px; text-indent:2em; font-weight:bold; margin-top:30px;">全屏2</p>
<p style="font-size:16px; text-indent:2em; font-weight:bold; margin-top:30px;">全屏3</p>
</body>
</HTML>