標籤: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-類比銀行卡帳號密碼登入頁面跳轉