码迷,mamicode.com
首页 > Web开发 > 详细

JSP-模拟银行卡账号密码登录页面跳转

时间:2016-10-28 23:31:06      阅读:274      评论:0      收藏:0      [点我收藏+]

标签:sdi   fail   rtm   lbp   udk   b16   pass   ack   ret   

<%@ 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>
</head>
<body>
<form action="NewFile1.jsp"method="post">
账户:<input type="text"name="name"><br>
密码:<input type="password"name="password"><br>
<input type="submit"value="提交"> 

</form>
</body>
</html>
<%@ 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>
</head>
<body>
<% 
String name = request.getParameter("name");
name = new String(name.getBytes("ISO-8859-1"),"UTF-8");
String password = request.getParameter("password");
out.print("账户:"+name+"<br>"+"密码:"+password);
if(name.equals("天下第一")&password.equals("tianxiadier"))
{
    
%>
<jsp:forward page="success.jsp"></jsp:forward>
<%
}
else
{
%>
<jsp:forward page="fail.jsp"></jsp:forward>
<%
}
%>
</body>
</html>
<%@ 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>
</head>
<body>登陆成功
</body>
</html>
<%@ 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>
</head>
<body>
账号或密码不正确
<br>
<a href="NewFile2.jsp">重新登录</a>
</body>
</html>

技术分享

技术分享

技术分享

技术分享

JSP-模拟银行卡账号密码登录页面跳转

标签:sdi   fail   rtm   lbp   udk   b16   pass   ack   ret   

原文地址:http://www.cnblogs.com/wangguoning/p/6009454.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!