1、使用form表单 action对象可以是jsp、servlet 点击 submit后 地址改变 页面跳转
或者:
相应的servlet:
tr tr tr /tr
源程序:
public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); String uname = request.getParameter("nu1"); String upassword = request.getParameter("nu2"); PrintWriter ou = response.getWriter(); ou.println("userddd: "+uname+""); ou.println("passdddword: "+upassword+""); }