JSP用户登录页面

<%@ 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="liuliu";
String password="1122333";

if(!name.equals(request.getParameter("name"))||!password.equals(request.getParameter("password")))
{
%>
	 <meta http-equiv="Refresh" content="0;url=cuowu.jsp">
<%	
}
else
{
	 out.println("提交成功");
}
%>

</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>
<form action="zhuye.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>
你真笨蛋
<meta http-equiv="Refresh" content="20;url=denglu.jsp">
</body>
</html>

 

posted @ 2016-06-25 08:27  刘某人丶  阅读(1339)  评论(0编辑  收藏  举报