首页 > 其他分享 >4.18

4.18

时间:2023-04-19 23:44:24浏览次数:30  
标签:String 360px 4.18 height width div font

所花时间(包括上课):4h

代码量(行):200行

博客量(篇):1篇

晚上学习

我了解到的知识点:

今天我修复了昨天传参报错的问题,改善了页面乱码的问题,实现了功能流畅运行,完成了组长交给的任务

遇到的问题,session传值问题,我不会多值传参,只会一个,不过好在可以改

<%@page import="DAO.dao"%>
<%@ page import="java.sql.*" language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="dao" class="DAO.dao" scope="page"/>
<%

request.setCharacterEncoding("utf-8");
String id=(String)request.getParameter("id");
String password=(String)request.getParameter("password");
int status=dao.panduan(id);
String getstatus=String.valueOf(status);
session.setAttribute("status", status);
Cookie c1 = new Cookie("id",id);// 新建一个Cookie对象
Cookie c2 = new Cookie("password",password);
Cookie c3 = new Cookie("status",getstatus);
c1.setMaxAge(60*60);
c1.setMaxAge(60*60);
c3.setMaxAge(60*60);
response.addCookie(c1);
response.addCookie(c2);
response.addCookie(c3);
if(password.equals(dao.search(id))){
if(status==1||status==3){
response.sendRedirect("main.jsp");
}
}else{
out.print("<script language='javaScript'> alert('账号错误/学生身份');</script>");
response.setHeader("refresh", "0;url=login.jsp");
}


%>
</body>
</html>

 

 

 

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
</head>
<style>
body {
background-color: gainsboro;
font-size: 16px;
}

.div_top_1 {
height: 140px;
width: 100%;
}

.div_top_2 {
height: 50px;
width: 100%;
}

.main {
width: 417.683px;
height: 440px;
background-color: #FFFFFF;
margin: 0 auto;

}

.login {

width: 360px;
height: 360px;
background-color: #FFFFFF;
margin: 0 auto
}

.div_login_head {
height: 36px;
background-color: #FFFFFF;
margin: 0 auto;
line-height: 36px;
text-align: center;
color: #666;
border-bottom: 3px solid #21b351;
font-size: 18px;
line-height: 24px;
margin-bottom: -1px;
font-family: "PingFang SC", "Microsoft yahei", "Helvetica Neue", "Helvetica", "Arial", sans-serif;
}

.div_input_account {
width: 360px;
height: 40px;

}

.div_input_pwd {
width: 360px;
height: 24px;

}

.input_account, .input_pwd {
width: 360px;
height: 40px;
border: none;
border-bottom: #ddd 1px solid;
border-radius: 0;
outline: 0;
font: inherit;
font-size: .875rem;
}

.div_button_login {
width: 360px;
height: 40px;
margin-top: 36px;
text-align: center;

}

.button_login {
width: 180px;
height: 40px;
background: #1fa54a;
font-size: 16px;
cursor: pointer;
color: white;
border: none;
border-radius: 2px;
outline: 0;

}

.div_empty {
width: 360px;
height: 24px;

}
.div_error {
width: 360px;
height: 24px;
text-align: center;
}
.span_error{

color: #e35b5a;
font-size: 13px;
}
</style>
<body>
<title>人脸识别登录页面</title>
<div class="center" align="center" >
<h1 style="color:blue">欢迎登录人脸识别签到系统</h1>

<div class="div_top_1">


</div>
<div class="main">
<div class="login">
<div class="div_top_2">

</div>
<div class="div_login_head">
密码登录
</div>

<div class="div_empty">
</div>
<form action="check.jsp" method="get">
<div class="div_input_account">
<input class="input_account" type="text" name="id" placeholder="用户名" value="${userName }"/>
</div>

<div class="div_empty">
</div>


<div class="div_input_pwd">
<input class="input_pwd" type="password" name="password" placeholder="密码" value="${password }"/>
</div>
<div class="div_empty">
</div>
<div class="div_error">
<span class="span_error"> ${errorMessage }</span>
</div>
<div class="div_button_login">
<input class="button_login" type="submit" value="登&nbsp;&nbsp;录"/>
</div>
<div >
<br><a href="zhuce.jsp">没有账号?注册</a>
</div>
</form>
</div>


</div>

</div>
</body>
</html>

 

标签:String,360px,4.18,height,width,div,font
From: https://www.cnblogs.com/zhaoshengfu/p/17335103.html

相关文章

  • 2023年windows DockerDeskTop最新款4.18.0 全程保姆级安装
    目录前景提示windows10内置的linux系统1.这个内置系统一定要在windowsstore里安装,否则,无法使用,这是重点。进入商店,搜索linux。2.一般画圈这些都可以使用。4.安装会让你输入微软账户密码(首次)。5.静静等待,本作的这个大概550M左右。6.装好后,会生成一个图标(像应用程序一样,双击......
  • 4.18趣味百题12题
    一问题描述一个人拥有x现金要存y年(y年后取出)银行有几款不同的期限的月息利率超出初始存款的钱会给利息(与原题不同的拓展)求出利息最多的方案.月利息  期限0.63%  一年0.66%  两年0.69%  三年0.75%  五年0.84%  八年 二思路设计每种方案单独设计......
  • 2023.4.18
    1//例8.12#include<iostream>3usingnamespacestd;4classComplex5{6public:7Complex(doubler=0.0,doublei=0.0):real(r),image(i){}8Complexoperator+(constComplex&c2)const;9Complexoperator-(constComplex......
  • day49(2023.4.18)
    1.MySQL事务 2.使用事务 3.事务的并发问题 4.事务的隔离级别 5.用户管理 6.使用Navicat创建用户  7.使用Navicat分配权限8.测试一下分配好的权限 9.删除用户 10.数据的导出 11.分页查询  day49(2023.4.18)......
  • 4.18号站立会议
    无敌三人组今天我们组成功解决了数据添加过程中出现的问题。数据的添加本来是比较麻烦的,因为是在fragment之中进行操作,所以数据的更新并不是可以直接显示出来的。 ......
  • 4.18团队会议
    1.整个项目预期的任务量:32小时,目前已花的时间:20小时,还剩余的时间:12小时2.公开任务看板照片: 3.4.产品的状态   ......
  • 变编程一小时2023.4.18
    1.#include<iostream>usingnamespacestd;classShape{ public: virtualdoublearea()const=0;};classCircle:publicShape{ public: Circle(doubler):radius(r) { } virtualdoublearea()const { return3.14159*radius*radius; } protected: dou......
  • 2023.4.18
    今天主要上了python课,我学了python,python好用,最恶心的一点就是代码风格问题,没用太多拘束,看着难受。晚上写了外包,实现了安卓pdf在线预览,通过安卓连接服务器来实现在线预览。 ......
  • 4.18学习总结
    用户输入整数n(1<=n<=26)和整数m(m<=n),然后输入n个不同的字母,请编写程序输出在这n个字母中选择m个字母的所有排列序列和组合序列。【源代码程序】import itertools#输入a=input("请输入整数n和整数m的值:")a1=a.split("")for iin a1[::]:    if i=='':    ......
  • HDLBits(16)4.18
    3电路3.2时序逻辑3.2.2计数器 Count1to10(Decadecounteragain)与上题一样,区别是复位为1moduletop_module(inputclk,inputreset,output[3:0]q);always@(posedgeclk)beginif(reset)q<=4'b0001......