1.不同窗口打开:
画面转入default.htm,
default.htm中加入如下代码:
<script language="javascript">
var a=window.open("about:blank","","top=0, left=0,toolbar=no, menubar=no, resizable=no,
scrollbars=no,location=no, status=yes")
//window.open("FileNoFound.aspx","");
self.opener=null ;
self.close() ;
a.moveTo(0,0)
a.resizeTo(screen.width,screen.height) ;
a.focus();
a.location="Default.aspx" ;
}
</script>
<body onload="openwindow()">
2.同一窗口打开
画面转入default.htm,
default.htm中加入如下代码:
<script language="javascript">
function openwindow(aspx)
{
now = new Date
s=now.getFullYear()
+now.getMonth()
+now.getDay()
+now.getHours()
+now.getMinutes()
+now.getMilliseconds ();
aspx=aspx+''?T=''+s;
var userWidth = screen.availWidth;
var userHeight = screen.availHeight;
var win=window.open (aspx, ''window'',
''height='' + userHeight + '', width='' + userWidth + '', top=0, left=0,toolbar=no, menubar=no, resizable=no,
scrollbars=no,location=no, status=yes'');
window.opener ='''';
win.focus ();
window.close ();
</script>
<body onload="openwindow(''Default.aspx'')"> |