如何在用户注册成功之后,显示“你已经注册成功!”并使用“定时功能”跳转到登陆页面呢?
register.jsp
<%@page contentType="text/html; charset=GB2312"%>
<html>
<head>
<title>register</title>
</head>
<body bgcolor="#ffffff">
<p align="center">新用户注册
<form name="thisForm" action="insert.jsp" method="GET" accept-charset="UTF-8" onsubmit="return formCheck()">
<script language="JavaScript" type="text/JavaScript">
function formCheck(){
number=new RegExp("05[0-3][0-9]");
if(thisForm.userID.value==""){
alert("请输入你的学号!");
return false;
userID.focus();
}else{
if(thisForm.userID.value.match(number)==null){
alert("格式输入错误,你必须输入这样的格式0538,前两位数字必须为05,后面两位必须从1--40");
userID.value="";
return false;
userID.focus();
}
}
if(thisForm.userName.value==""){
alert("请输入你的姓名!");
return false;
userName.focus();
}
if(thisForm.password.value!=thisForm.pass.value){
alert("两次输入的密码不一致,请再次输入!");
password.value="";
pass.value="";
return false;
password.focus();
}
return true;
}</script>
<p align="center">
<table>
<tr>
<td align="right">学号:</td>
<td>
<input type="text" name="userID"/>
</td>
</tr>
<tr>
<td align="right">注册名:</td>
<td>
<input type="text" name="userName"/>
</td>
</tr>
<tr>
<td align="right">密码:</td>
<td>
<input type="password" name="password"/>
</td>
</tr>
<tr>
<td align="right">请再次输入密码:</td>
<td>
<input type="password" name="pass"/>
</td>
</tr>
<tr>
<td><input type="submit" name="sub" value="提交"></td>
<td><input type="reset" name="res" value="重写">
</tr>
</table>
</form>
</body>
</html>
登录文件是:login.jsp,如何在如何在用户注册成功之后,显示一条信息,如“你已经注册成功!”,并且在经过几秒后自动跳转到login.jsp页面呢?求教!