<%@ 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>***欢迎进入注册界面***</title>
<script src="js/jquery-1.11.2.min.js"></script>
<script>
$(function(){
$("#aaa").click(function(){
$.ajax({
type: "POST",
url: "<%=request.getContextPath()%>/regservlet",
data: $("#form1").serialize(),
success: function(msg){
// alert( "Data Saved: " + msg );
$("#result").html(msg);
}
});
})
})
</script>
</head>
<body>
<form id="form1">
用户名:<input type="text" name="name"><br>
密码:<input type="password" name="password"><br>
验证密码:<input type="password" name="repeatpwd"><br>
邮箱:<input type="email" name="email"><br>
<input type="button" id="aaa" value="提交"> <input type="reset" id="bbb"><br>
</form>
<span id="result"></span>
</body>
</html>
网友评论