怎样控制我的首页(htm文件)只要一打开就全屏显示! (10分)

  • 主题发起人 主题发起人 zbwkl
  • 开始时间 开始时间
Z

zbwkl

Unregistered / Unconfirmed
GUEST, unregistred user!
请问各位大虾:我怎样控制我的首页(htm文件)只要一打开就全屏显示!
 
<script>
function showMe()
{
newwin=window.open();
newwin.document.write(document.body.innerHTML);
//注意大小写
}
</script>
 
问zbwkl,你是否是工程学院五征的?
 
除非新开窗口,否则没有办法,最多只能将窗口设置成跟屏幕一样大,但不能全屏。
 
借助中间窗口 否则不能办到
 
在Head部分增加
<script language="JavaScript">
<!--
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);
//-->
</script>
 
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>
 
后退
顶部