<!--test.htm-->
<html>
<head>
<script language="JavaScript">
<!--
function enterSys()
{
window.open("test.htm","","toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600");
window.opener=null;
window.close();
}
//-->
</script>
</head>
<body>
<input type="button" onclick="enterSys()" value="进入">
</body>
</html>
是不是这个意思
<html>
<head>
<script language="JavaScript">
<!--
function enterSys()
{
window.open("test.htm","","toolbar=no,scrollbars=yes,resizable=yes,width=800,height=600");
window.opener=null;
window.close();
}
//-->
</script>
</head>
<body>
<input type="button" onclick="enterSys()" value="进入">
</body>
</html>
是不是这个意思
不错,不过
window.opener=null;
window.close();
要ie5.5+以上才有用.另外提交用户名与密码用GET方式提交
需要返回到jsp页面一个值来判断成功还是失败
rs=exeSql("select * from t_user where username='aaa' and pwd='bbb'");句子我不怎么会写,大概是这么个意思吧,然后根据返回值来确定输入的HTML代码就可以了
<% if (rs.getInt(0)>0) {%>
window.open("","");
................
<%}else%>
显示页面的代码
<%}%>
差不多就是这个样子了吧