我的最佳解决方案 <script> function tofull(){ var file =self.location; var a = window.open('','max','top=0,left=0,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width='+(screen.width-10)+',height='+(screen.availheight-30)) self.opener=null self.close() a.moveTo(0,0) a.resizeTo(screen.Width,screen.Height) a.focus(); a.location=file; } </script> 这是一个演示程序,点击下面的“如我所愿”按钮,将使本页只显示标题栏。 <p align=center><input type="button" value="如我所愿" onclick=tofull()></p>
Sorry,Perhaps this one will be OK 我的最佳解决方案 <script> function tofull(){ var file =self.location; var a = window.open('about:blank','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes') self.opener=null self.close() a.focus(); a.location=file; } </script> 这是一个演示程序,点击下面的“如我所愿”按钮,将使本页只显示标题栏。 <p align=center><input type="button" value="如我所愿" onclick=tofull()></p>
</body>
function MaxiWindow()
{
var str='<object id=maxiw type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><param name="Command" value="MAXIMIZE"></object>';
if(document.body)
{
if(!document.getElementById("maxiw"))document.body.insertAdjacentHTML("BeforeEnd",str);
maxiw.Click();
}
else
{
document.write(str+"<script>maxiw.Click()</scrip"+"t>");
}
}
</script>
<a href=# onclick=MaxiWindow()>点这里最大化</a>
<script>
function tofull(){
var file =self.location;
var a = window.open('','max','top=0,left=0,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width='+(screen.width-10)+',height='+(screen.availheight-30))
self.opener=null
self.close()
a.moveTo(0,0)
a.resizeTo(screen.Width,screen.Height)
a.focus();
a.location=file;
}
</script>
这是一个演示程序,点击下面的“如我所愿”按钮,将使本页只显示标题栏。
<p align=center><input type="button" value="如我所愿" onclick=tofull()></p>
我的最佳解决方案
<script>
function tofull(){
var file =self.location;
var a = window.open('about:blank','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes')
self.opener=null
self.close()
a.focus();
a.location=file;
}
</script>
这是一个演示程序,点击下面的“如我所愿”按钮,将使本页只显示标题栏。
<p align=center><input type="button" value="如我所愿" onclick=tofull()></p>
我想让IE一启动,就立即最大化。
但是:
<body background="images/bg1.gif" MS_POSITIONING="GridLayout" onload ="window.open('','','fullscreen=1')" value=max>
虽然最大化了,却是空白的窗口?请不吝赐教!