?? reg.jsp
字號:
<%@page contentType="text/html; charset=GBK"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<title>reg</title>
<script type="javascript">
function check()
{
if(document.form1.userName.value=="")
{
alert("請輸入用戶名");
document.form1.userNamefocus();
return false;
}else if(document.form1.userPwd.value=="")
{
alert("請輸入密碼");
document.form1.userPwd.focus();
return false;
}
else if(document.form1.reigthUserPwd.value=="")
{
alert("請輸入確認密碼");
document.form1.reigthUserPwd.focus();
return false;
}else if(document.form1.userPwd.value!=document.form1.reigthUserPwd.value)
{
alert("新密碼和確認密碼不一致!");
return false;
}else
{
return true;
}
}
</script>
</head>
<body bgcolor="#ffffff">
<center>
<form action="regservlet">
<c:if test="${empty requestScope.regresult}">
<table>
<tr>
<td> 用戶名:
<input type="text" name="userName"/>
</td>
</tr>
<tr>
<td> 用戶密碼:
<input type="password" name="userPwd"/>
</td>
</tr>
<tr>
<td> 確認密碼:
<input type="password" name="reigthUserPwd"/>
</td>
</tr>
<tr>
<td>
<input type="submit" onclick="check()" value="注冊"/>
<input type="reset" value="重置"/>
</td>
</tr>
</table>
</c:if>
<c:if test="${requestScope.regresult==true}">
<table>
<tr>
<td>
<font color="red">恭喜注冊成功成功!</font>
</td>
</tr>
<tr>
<td>
<a href="javascript:opener.location.href='login.jsp';javascript:window.close(this);">現在登陸</a>
</td>
</tr>
</table>
</c:if>
<c:if test="${requestScope.regresult==false}">
<table>
<tr>
<td>
<font color="red">注冊失敗! 可能用戶名已存在 或者含有非法字符! 請在嘗試</font>
</td>
</tr>
<tr>
<td>
<a href="reg.jsp">繼續注冊</a>
</td>
<td>
<a onclick="javascript:window.close(this);">放棄</a>
</td>
</tr>
</table>
</c:if>
</form>
</center>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -