jsp-注册页面
2018-03-09 15:47
288 查看
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
//验证注册表单
function checkForm(){
var username=document.getElementById("username").value;
if(username==null||username==""){
alert("用户名不能为空");
return false;
}
//为其他字段添加非空校验
var password=document.getElementById("password").value;
var repassword=document.getElementById("repassword").value;
if(password!=repassword )
{
alert("两次密码必须一致");
return false;
}
}
</script>
</head>
<body>
<h1>Estore商城用户注册</h1>
<!-- 一次性验证码 -->
<form action="${pageContext.request.contextPath}/regist" method="post" onsubmit="return checkForm();">
<table>
<tr>
<td>用户名</td>
<td><input type="text" name="username" id="username"/></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password" id="password"/></td>
</tr>
<tr>
<td>确认密码</td>
<td><input type="password" name="repassword" id="repassword"/></td>
</tr>
<tr>
<td>昵称</td>
<td><input type="text" name="nickname"/></td>
</tr>
<tr>
<td>邮箱</td>
<td><input type="text" name="email"/></td>
</tr>
<tr>
<td>验证码</td>
<td><input type="text" name="checkcode"/><img sr
8eb3
c="/checkcode"></td>
</tr>
<tr>
<td><input type="submit" value="注册"/></td>
<td>
<!--登录 链接登录页面 ,返回 返回之前页面 -->
<input type="button" value="返回" onclick="histpry.go(-1)"/>
</td>
</tr>
</table>
</form>
</body>
</html>
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
//验证注册表单
function checkForm(){
var username=document.getElementById("username").value;
if(username==null||username==""){
alert("用户名不能为空");
return false;
}
//为其他字段添加非空校验
var password=document.getElementById("password").value;
var repassword=document.getElementById("repassword").value;
if(password!=repassword )
{
alert("两次密码必须一致");
return false;
}
}
</script>
</head>
<body>
<h1>Estore商城用户注册</h1>
<!-- 一次性验证码 -->
<form action="${pageContext.request.contextPath}/regist" method="post" onsubmit="return checkForm();">
<table>
<tr>
<td>用户名</td>
<td><input type="text" name="username" id="username"/></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="password" id="password"/></td>
</tr>
<tr>
<td>确认密码</td>
<td><input type="password" name="repassword" id="repassword"/></td>
</tr>
<tr>
<td>昵称</td>
<td><input type="text" name="nickname"/></td>
</tr>
<tr>
<td>邮箱</td>
<td><input type="text" name="email"/></td>
</tr>
<tr>
<td>验证码</td>
<td><input type="text" name="checkcode"/><img sr
8eb3
c="/checkcode"></td>
</tr>
<tr>
<td><input type="submit" value="注册"/></td>
<td>
<!--登录 链接登录页面 ,返回 返回之前页面 -->
<input type="button" value="返回" onclick="histpry.go(-1)"/>
</td>
</tr>
</table>
</form>
</body>
</html>
相关文章推荐
- jsp商城注册用户页面(1)
- 用WebWork、JSP、Velocity建立注册页面
- JSP之登录,注册页面(三)
- JSP实现登录注册并链接数据库页面
- Jsp页面注册与登录
- JSP作业3 - 使用JSP实现简单的用户登录注册页面
- jsp注册页面,Ajax实现验证用户名是否存在,密码是否一致,当不存在时,注册按钮变成灰色。
- 关于jsp web项目,jsp页面与servlet数据不同步的解决办法(报错404、405等)即访问.jsp和访问web.xml中注册的/servlet/的区别
- JSP之登录,注册页面(四)
- jsp注册页面,全解
- 典型jsp用户注册处理页面
- jsp-注册页面
- jsp+jstl+servlet+javaBean+Mysql用户登录注册页面
- JSP用户注册登陆注销JSP页面
- 用WebWork、JSP、Velocity建立注册页面
- JSP作业4 - 使用JSP+JavaBean+Servlet实现用户登录注册页面
- 使用JSP Servlet和Ajax实现简单的注册页面的用户名密码验证
- 新闻发布项目——注册页面(reg.jsp)
- JSP注册页面
- 典型注册页面JSP实现