JAVA+JSP+HTML+数据库 实现网页的登录和注册(附全网最详细代码)

 JAVA+JSP+HTML+数据库 实现网页的登录和注册(全网最详细代码)

受疫情的影响自己在家鼓捣点了东西,也是项目中的一部分,实现了网页的登录和注册,在大佬面前不可一提,本人只是分享自己的实现过程,希望对看到的你有所帮助。

项目的层次图:

代码:

login.jsp(登录界面实现)

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Wopop</title>
<link href="./Wopop_files/style_log.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/style.css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/userpanel.css">
<link rel="stylesheet" type="text/css" href="./Wopop_files/jquery.ui.all.css">

<style type="text/css">
<!--
.STYLE1 {
	font-size: 24px;
	color: #000000;
	font-weight: bold;
}

.p_left{display:inline;}
.p_right{display:inline;} 
-->
</style>
</head>

<body class="login" mycollectionplug="bind">
<div class="login_m">
<div class="login_logo STYLE1">系统登录</div>
<div class="login_boder">

<div class="login_padding" id="login_model">
<form action="loginpost.jsp" method="post">
<% 
	Object error=session.getAttribute("error");
   if(error!=null)
   {
%>
	<span style="color:red"><%=error %></span>
	<%} %>

  <h2>账号</h2>
  <label>
    <input type="text" id="username" name="username" class="txt_input txt_input2" onfocus="if (value ==&#39;Your name&#39;){value =&#39;&#39;}" onblur="if (value ==&#39;&#39;){value=&#39;Your name&#39;}" value="Your name">
  </label>
  <h2>密码<
  • 46
    点赞
  • 147
    收藏
    觉得还不错? 一键收藏
  • 42
    评论
评论 42
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值