<span>package com.validator.test; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class AccountServlet extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String loginname=request.getParameter("loginname"); PrintWriter out = response.getWriter(); if(loginname.equals("abc123")){ out.println("1"); }else{ out.println("0"); } out.flush(); } }</span>
jQuery ajax MD5实现用户注册即时验证功能(2)
内容版权声明:除非注明,否则皆为本站原创文章。