<script language="javascript">
var screenwidth=screen.width;
var screenheight=screen.height;
function enter(aasc)
{
window.open(aasc,'reslut','menubar=no,toolbar=no,location=no,directoris=no,status=no,resizable=0,scrollbars=0,width='+screenwidth+',height='+screenheight+',left=0,top=0')
}
</script>
var screenwidth=screen.width;
var screenheight=screen.height;
function enter(aasc)
{
window.open(aasc,'reslut','menubar=no,toolbar=no,location=no,directoris=no,status=no,resizable=0,scrollbars=0,width='+screenwidth+',height='+screenheight+',left=0,top=0')
}
</script>
不能关闭呀
我要一个主页index.htm填入用户名密码登陆--检查(后台check.asp)--进入(admin.asp)全屏--同时关闭index.htm
试过了,没用
var screenwidth=screen.width;
var screenheight=screen.height;
function enter(aasc)
{
window.open(aasc,'reslut','menubar=no,toolbar=no,location=no,directoris=no,status=no,resizable=0,scrollbars=0,width='+screenwidth+',height='+screenheight+',left=0,top=0');
self.close();
}
一下是全部代码
<body onselectstart="return false" scroll=no onload=javascript:form1.username.focus();>
<SCRIPT language=JavaScript>
//-------------------- 防止出错 ---------------------------
function killErrors()
{
return true;
}
window.onerror = killErrors;//------------------- 窗口最大化 --------------------------
self.moveTo(0,0); <!-- 将当前窗口缩小为 -->
self.resizeTo(screen.availWidth,screen.availHeight); <!-- 将当前窗口设置为屏幕大小 -->
self.focus(); // 状态栏显示文字
window.defaultStatus=""; function Login()
{
strURL = "你的check页面.asp?username=" + document.form1.username.value + "&password=" + document.form1.password.value ;
nWidth = screen.availWidth;
nHeight = screen.availHeight;
window.open(strURL, "","toolbar=no,location=no,directories=no,status=no,"+ "menubar=no,copyhistory=no,left=0,top=0,resizable=yes,"+ "width=" + nWidth + ",height=" + nHeight);
//window.showModelessDialog(strURL,'','scroll:0;status:0;help:0;resizable:1;dialogWidth:'+nWidth+'px;dialogHeight:'+nHeight+'px');
window.opener=null;
window.close();
}
</SCRIPT><form name=form1 onsubmit=Login(); method=post>
<table width="245" border="0" align="center" cellpadding="0" cellspacing="2">
<tr>
<td>用户名:</td>
<td>
<input name="username" type="text" id="username" >
</td>
</tr>
<tr>
<td>密 码:</td>
<td>
<input name="password" type="password" id="password" ">
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" value="登录" class=button1>
</td>
</tr>
</table>
</form>
</body>