标签:rect .com correct input receive send password 登录 post
<html>
<body>
<form action="ch03_11_userReceive.jsp" method="post">
姓名:<input type="text" name="RdName"><br>
密码:<input type="password" name="RdPasswd"><br><br>
<input type="submit" value="确定">
</form>
</body>
</html>
<html>
<body>
<%String Name=request.getParameter("RdName");
String Passwd=request.getParameter("RdPasswd");
if(Name.equals("abcdef")&&Passwd.equals("123456"))%>
<jsp:forward page="ch03_11_loginCorrect.jsp"/>
<%else%>
response.sendRedirect(http://sohu.com);
</body>
</html>
<html>
<body>
<%String Name=request.getParameter("RdName");%>
欢迎, <%=Name>成功登录!
</body>
</html>
标签:rect .com correct input receive send password 登录 post
原文地址:http://www.cnblogs.com/jgrs/p/7594145.html