ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

每周总结(22/9/10)

2022-09-11 15:01:41  阅读:234  来源: 互联网

标签:10 UTF 22 登录 每周 title Insert pass id


<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="login_result.jsp"method="post">
<h1 align="center">用户登录</h1>
<table align="center">
<tr>
<td>用户名称:</td>
<td><input type="text" value="" name="id"/></td>
</tr>

<tr>
<td>用户密码:</td>
<td><input type="password" value="" name="pass"/></td>
</tr>
<tr>

<td><input type="reset" value="重置键"></td>
<td><input type="submit"></td>

</tr>
</table>
</form>

</body>
</html></html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>

登录失败,请<a href="index.jsp" >重新登录</a>

</body>
</html>
<%--
Created by IntelliJ IDEA.
User: bin
Date: 2022/9/6
Time: 16:20
To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
//1 获取页面上的登录信息
String id =request.getParameter("id");//获取账号
String pass = request.getParameter("pass");//获取密码

//2 登录验证(跟自己的QQ账号密码比,比死的:下去把自己的账号密码和文件中对比;后期跟数据库中对比,比活的)
if(id.equals("123") && pass.equals("1234")){
//登陆成功
response.sendRedirect("main.html");
}else{
%>
<jsp:forward page = "login2.jsp"></jsp:forward>

<%
}
%>

</body>
</html>

标签:10,UTF,22,登录,每周,title,Insert,pass,id
来源: https://www.cnblogs.com/bin1004/p/16684002.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有