前言

  我们在登录网页的时候有时候会见到有几个字叫十天内免登陆复选框,比如126邮箱的登录页面

 

 

Servlet实现网页十天免登陆功能

 

 实现:

    这里我们就要使用Cookie技术,Cookie技术是Web开发中必备的技术之一。

  先开看下我的项目结构,下面直接贴代码,代码里面有详细的注释。

登录页面index.html

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
        <!--login指向的是配置文件-->
    <form action="/你的项目名/login" method="post">
        账号
        <input type="text" name="username"><br>
        密码
        <input type="password" name="password"><br>
        <input type="checkbox" name="tenDayLogin" value="ok">十天内免登陆<br>
        登录
        <input type="submit" value="登录">
    </form>
</body>
</html>
View Code

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-29
  • 2021-11-30
  • 2022-12-23
  • 2021-06-10
猜你喜欢
  • 2021-10-07
  • 2022-12-23
  • 2021-11-29
  • 2022-12-23
  • 2021-06-29
  • 2021-05-18
  • 2022-12-23
相关资源
相似解决方案