<script type="text/javascript"> </script> <!---<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>register.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript">
String.prototype.Trim=function()
{
return this.replace(/(^/s*)|(/s*$)/g,"");
}
function checkRegister()
{
var userName = document.getElementById("user.userName").value;
var userNickName = document.getElementById("user.userNickName").value;
var userPwd = document.getElementById("user.userPwd").value;
var userPwd2 = document.getElementById("userRPwd2").value;
if(userName.Trim() == "")
{
alert("用户名不能为空");
document.getElementById("user.userName").focus();
return false;
}
if(userNickName.Trim() == "")
{
alert("昵称不能为空!");
document.getElementById("user.userNickName").focus();
return false;
}
if(userPwd.Trim() == "")
{
alert("密码不能为空!");
document.getElementById("user.userPwd").focus();
return false;
}
if(userPwd2.Trim() == "")
{
alert("密码确认不能为空!");
document.getElementById("user.userPwd2").focus();
return false;
}
if(userPwd!=uerPwd2)
{
alert("两次密码不一样, 请重新输入!");
document.getElementById("userPwd2").focus();
return false;
}
documetn.forms[0].action="main.do?method=register";
document.forms[0].submit();
}
</script>
</head>
<body>
${message }
<html:form action="main.do" method="post">
<table align="center">
<tr>
<td colspan="2" align="center"> 用户注册
</td>
</tr>
<tr>
<td>
用户名:
</td>
<td>
<html:text property="user.userName"/>
</td>
</tr>
<tr>
<td>
昵称:
</td>
<td>
<html:text property="user.userNickName"/>
</td>
</tr>
<tr>
<td>
密 码:
</td>
<td>
<html:password property="user.userPwd"/>
</td>
</tr>
<tr>
<td>
确认密码:
</td>
<td>
<input type="password" name="userPwd2" id="userPwd2">
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="button" value="注册" id="btnRegister" οnclick="checkRegister()">
</td>
</tr>
</table>
</html:form>
</body>
</html:html>
-->
${message }