eyangyj只是实现了窗口的最大化:
以下是来年感个全屏幕的代码:
1.脚本说明:
把如下代码加入<body>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- begin
if (this.name!='fullscreen'){
window.open(location.href,'fullscreen','fullscreen,scrollbars')
}
// End -->
</script>
<a href="JavaScript:window.close(self)">返回正常效果显示</a>
2.脚本说明:
把如下代码加入<body>区域中
<SCRIPT LANGUAGE="JavaScript">
<!-- begin
// set the page to go to...
url = "http://www.delphibbs.com";
// set how fast to expand horizontally
// lower is slower
var speedX = 7;
// set how fast to expand vertically
// lower is slower
var speedY = 5;
// set background color of "Loading..." screen
var bgColor = "#000000";
// set text color of "Loading..." screen
var txtColor = "#FF80000";
//do
not edit below this line
// ---------------------------
if (document.all) {
var wide = window.screen.availWidth;
var high = window.screen.availHeight;
}
function andBoom() {
if (document.all) {
var Boomer = window.open("","BoomWindow","fullscreen");
Boomer.document.write('<HTML><BODY BGCOLOR='+bgColor+' SCROLL=NO><FONT FACE=ARIAL COLOR='+txtColor+'>Loading...</FONT></BODY></HTML>');
Boomer.focus();
for (H=1;
H<high;
H+= speedY) {
Boomer.resizeTo(1,H);
}
for (W=1;
W<wide;
W+= speedX) {
Boomer.resizeTo(W,H);
}
Boomer.location = url;
}
else
{
window.open(url,"BoomWindow","");
}
}
// End -->
</script>
<a href="javascript:andBoom()">动态打开全屏窗口</a>