css+js简单实现126邮箱注册页面

经常受点刺激也是好事。提醒自己别忘了持之以恒。
开头先祝大家平安夜快乐。
下面是简单实现126邮箱注册,也是一个作业。主要实现了:邮箱检测,密码强度检测,重复密码检测等。
<!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=gb2312" />
<title>126注册</title>

<style type="text/css">
<!--
body{
margin-left:140px;
}
#top {
margin-top:20px;
width:960px;
height:35px;
}
#pho{
background-repeat:no-repeat;
width:650px;
height:35px;
background-image:url(img/pho.png);
float:left;
}
#txt{
font:"宋体";
font-size:14px;
margin-top:10px;
margin-left:150px;
width:130px;
height:30px;
float:left;
}
#welcome{
margin-top:20px;
background-image:url(img/welcome.png);
width:960px;
height:40px;
}
#main{
width:960px;
height:540px;
border:1px;
}
#mleft{
width:640px;
height:540px;
float:left;
}
#mright{
width:320px;
height:540px;
background-image:url(img/rightm.png);
float:left;
}
#rbutton{
	margin-left:145px;
	margin-top:50px;
}
#emailR{	
	float:left;
	background-color:#375BEC;
	font-size:18px;
	font-family: "宋体";
	color: #FFFFFF;
	border-radius:5px;
}
#phoneR{
	background-color:#375BEC;
	font-size:18px;
	font-family: "宋体";
	color: #FFFFFF;
	float:left;
	border-radius:5px;
}
#tab{
color:#999999;
padding-top:20px;
margin-left:60px;
widows:450px;
height:380px;
clear:both;
font:"微软雅黑";
font-size:16px;
}
#bottom{
margin-top:20px;
}
#passStrongC{
width:90px;
}
#ps1{
float:left;
width:30px;
}
#ps2{
float:left;
width:30px;
}
#ps3{
float:left;
width:30px;
}
a:

-->
</style>
</head>

<body >
<div id="top">
	<div id="pho"> </div&
  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
在Java、HTMLCSS和JDBC MySQL环境中实现登录注册页面,通常需要分为以下几个步骤: 1. **HTML布局**: - 使用HTML创建用户界面,包括输入框(username, password)、登录/注册按钮等基本元素。 ```html <form action="login注册路径" method="post"> <label for="username">用户名:</label> <input type="text" id="username" name="username"> <br> <label for="password">密码:</label> <input type="password" id="password" name="password"> <br> <button type="submit">登录/注册</button> </form> ``` 2. **CSS样式**: - 使用CSS美化表单,添加颜色、字体、间距等视觉效果。 ```css form { width: 300px; margin: auto; } button { background-color: #4CAF50; color: white; } ``` 3. **Java后端处理**: - 使用Java编写Servlet或Spring MVC控制器来处理HTTP请求。 - JDBC用于数据库交互,连接MySQL并操作数据(例如查询用户是否存在,保存新用户信息)。 ```java // 示例:查询用户名是否已存在 String sql = "SELECT * FROM users WHERE username = ?"; PreparedStatement pstmt = conn.prepareStatement(sql); pstmt.setString(1, username); ResultSet rs = pstmt.executeQuery(); ``` 4. **JSP或Thymeleaf模板**: - 使用JSP或现代模板引擎(如Thymeleaf)动态渲染结果,显示错误消息或成功提示。 5. **安全性考虑**: - 对密码进行哈希存储,避免明文存储风险。 - 进行输入验证,防止SQL注入等攻击。 6. **部署**: - 将前端静态文件和后端应用部署到服务器上,确保访问路径配置正确。
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值