HTML5注册页面示例代码


Posted in HTML / CSS onMarch 27, 2014

复制代码
代码如下:

<!DOCTYPE html>
<html>
<head>
<title>register.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<LINK rel="Shortcut icon" href="favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/register.css" />
<script src="js/checkbox.js" type="text/javascript">
</script>
<script type="text/javascript">
function play(){
document.getElementById("menu_item").style.display = "";
}
function noplay(){
document.getElementById("menu_item").style.display = "none";
}
function passwd(){
var pass = document.getElementById("password").value;
var tip = document.getElementById("tip");
if (pass.length < 4) {
document.getElementById("meter").value = pass.length;
tip.innerHTML = "差";
}
else
if (pass.length <= 8) {
document.getElementById("meter").value = pass.length;
tip.innerHTML = "中";
}
else {
document.getElementById("meter").value = pass.length;
tip.innerHTML = "高";
}
}
</script>
</head>
<body>
<div id="3" style="position: relative; top: 100px; z-index: 3;">
<form id="f1" action="register.html" method="post">
<table align="center" cellspacing="0" class="table">
<tr class="thead">
<td align="center">
会员注册
</td>
</tr>
<tr>
<td>
<table id="registertable" border="0px" align="center" border="0px" cellspacing="0" cellpadding="5px">
<tr>
<tr>
<td align="right">
员工编号:
</td>
<td align="left">
<input type="text" name="username" placeholder="用户名" required/>
</td>
</tr>
<tr>
<td align="right">
密 码:
</td>
<td align="left">
<input type="password" name="password" id="password" placeholder="密码" required onkeyup="passwd()"/>
<meter min="1" max="10" low="5" high="8" value="0" id="meter">
</meter>
<span id="tip"></span>
</td>
</tr>
<tr>
<td align="right">
密码确认:
</td>
<td align="left">
<input type="password" name="password2" placeholder="确认密码" required/>
</td>
</tr>
<tr>
<td align="right">
生 日:
</td>
<td align="left">
<input type="date" name="borthday" />
</td>
</tr>
<tr>
<td align="right">
性 别:
</td>
<td align="left">
<input type="radio" name="gender" value="0" checked/>男
<input type="radio" name="gender" value="1"/>女
</td>
</tr>
<tr>
<td align="right">
邮 箱:
</td>
<td align="left">
<input type="email" name="email" placeholder="邮箱" id="email" required/>
</td>
</tr>
<tr>
<td align="right">
手 机:
</td>
<td align="left">
<input type="tel" pattern="[0-9]{11}" id="p" name="phone" placeholder="请输入11位数字" />
</td>
</tr>
<tr>
<td align="right">
地 址:
</td>
<td align="left">
<input type="text" name="address" placeholder="地址" list="l"/>
<datalist id="l">
<option value="sh">上海</option>
<option value="bj">北京</option>
<option value="js">江苏</option>
<option value="zz">郑州</option>
<option value="sz">深圳</option>
</datalist>
</td>
</tr>
<tr>
<td align="right">
个人网页:
</td>
<td align="left">
<input type="url" name="page" placeholder="主页网址" />
</td>
</tr>
<tr>
<td align="right">
起床时间:
</td>
<td align="left">
<input type="time" name="bed" onblur="pro()"/>
</td>
</tr>
<tr>
<td align="right">
头像:
</td>
<td align="left">
<input type="file" id="f" accept="image/jpeg" onchange="show()"/><span><img id="img" src="" width="60" height="60" /></span>
<script>
function show(){
var file = document.getElementById("f").files[0];
var fileReader = new FileReader();
fileReader.readAsDataURL(file);
fileReader.onload = function(){
document.getElementById("img").src = fileReader.result;
}
}
</script>
</td>
</tr>
<tr>
<td colspan="2">
<details>
<p>
允许注册
<mark>
许可证
</mark>信息
</p>
<summary>
注册许可信息
</summary>
</details>
</td>
</tr>
<tr>
<td align="right">
验证码:
</td>
<td valign="middle">
<input type="text" name="captcha" size="11" maxlength="4" title="输入右边的验证码" />
<span id="span"></span>
<script>
var span = document.getElementById("span");
span.innerHTML=Math.floor(Math.random());
</script>
</td>
</tr>
<tr height="60px">
<td align="center" colspan="2">
<input type="button" value="转到登录" onclick="window.location.replace('login.html')" id="btn1" onmousemove="changeBgColor('btn1')" onmouseout="recoverBgColor('btn1')" class="submit" /> <input type="submit" accesskey="enter" value="注册" id="btn" onmousemove="changeBgColor('btn')" onmouseout="recoverBgColor('btn');" class="submit" formmethod="post"/>
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</div>
</body>
</html>
复制代码
代码如下:

body {
background-image: url("../images/bg.jpg");
text-align: center;
background-repeat: repeat-x;
background-position: 0px 0px ;
background-size:
}
.table {
border: 1px solid #90BFFF;
width:810px;
}
tr {
font-family: 微软雅黑;
font-weight:800;
color: #448EF3;
}
input{
border: 1px solid #448EF3;
color: #448EF3;
font-weight:bold;
font-family: "微软雅黑";
height: 35px;
line-height: 30px;
border-radius:5px;
}
.submit {
width: 150px;
height: 40px;
cursor :hand;
font-size: 20px;
color: #ffffff;
background-color: #448EF3;
border: 0px;
}
.thead {
height: 40px; background : #90BFFF;
font-family: "微软雅黑";
font-size: 30px;
font-weight: 700;
color: #ffffff;
background: #90BFFF;
}
#3{
margin-bottom: 100px;
}
复制代码
代码如下:

function ChkAllClick(sonName, cbAllId){
var arrSon = document.getElementsByName(sonName);
var cbAll = document.getElementById(cbAllId);
var tempState=cbAll.checked;
for(i=0;i<arrSon.length;i++) {
if(arrSon[i].checked!=tempState)
arrSon[i].click();
}
}
function ChkSonClick(sonName, cbAllId) {
var arrSon = document.getElementsByName(sonName);
var cbAll = document.getElementById(cbAllId);
for(var i=0; i<arrSon.length; i++) {
if(!arrSon[i].checked) {
cbAll.checked = false;
return;
}
}
cbAll.checked = true;
}
function ChkOppClick(sonName){
var arrSon = document.getElementsByName(sonName);
for(i=0;i<arrSon.length;i++) {
arrSon[i].click();
}
}
function changeBgColor(btn){
var btn = document.getElementById(btn);
btn.style.backgroundColor = "#90BFFF"
}
function recoverBgColor(btn){
var btn = document.getElementById(btn);
btn.style.backgroundColor = "#448EF3"
}

------------------------------------------------

上面文件的顺序是:register.html register.css checkbox..js

-------------------------------------------------

背景图片:bg.jpg

HTML5注册页面示例代码

HTML / CSS 相关文章推荐
CSS3轻松实现圆角效果
Nov 09 HTML / CSS
css3 box-shadow阴影(外阴影与外发光)图示讲解
Aug 11 HTML / CSS
如何利用CSS3制作3D效果文字具体实现样式
May 02 HTML / CSS
举例详解CSS3中的Transition
Jul 15 HTML / CSS
html5视频播放_动力节点Java学院整理
Jul 13 HTML / CSS
使用html5+css3来实现slider切换效果告别javascript+css
Jan 08 HTML / CSS
html5小技巧之通过document.head获取head元素
Jun 04 HTML / CSS
HTML5有哪些新特征
Dec 01 HTML / CSS
实例讲解使用SVG制作loading加载动画的方法
Apr 05 HTML / CSS
详解HTML5之pushstate、popstate操作history,无刷新改变当前url
Mar 15 HTML / CSS
清除canvas画布内容(点擦除+线擦除)
Aug 12 HTML / CSS
微信小程序纯CSS实现无限弹幕滚动效果
Sep 23 HTML / CSS
html5实现微信打飞机游戏
Mar 27 #HTML / CSS
html5 canvas fillRect坐标和大小的问题解决方法
Mar 26 #HTML / CSS
html5适合移动应用开发的12大特性
Mar 19 #HTML / CSS
用html5实现语音搜索框的方法
Mar 18 #HTML / CSS
HTMl5的存储方式sessionStorage和localStorage详解
Mar 18 #HTML / CSS
HTML5 Notification(桌面提醒)功能使用实例
Mar 17 #HTML / CSS
让IE9以下版本的浏览器兼容HTML5的方法
Mar 12 #HTML / CSS
You might like
php判断输入不超过mysql的varchar字段的长度范围
2011/06/24 PHP
php json_encode值中大括号与花括号区别
2013/09/30 PHP
php数组查找函数in_array()、array_search()、array_key_exists()使用实例
2014/04/29 PHP
FleaPHP框架数据库查询条件($conditions)写法总结
2016/03/19 PHP
php-msf源码详解
2017/12/25 PHP
PHP7.3.10编译安装教程
2019/10/08 PHP
php 使用 __call实现重载功能示例
2019/11/18 PHP
JavaScript 的方法重载效果
2009/08/07 Javascript
javascript中substr,substring,slice.splice的区别说明
2010/11/25 Javascript
JavaScript面向对象之Prototypes和继承
2012/07/12 Javascript
在浏览器窗口上添加遮罩层的方法
2012/11/12 Javascript
jQuery+CSS实现菜单滑动伸展收缩(仿淘宝)
2013/03/22 Javascript
如何获取select下拉框的值(option没有及有value属性)
2013/11/08 Javascript
angularJS Provider、factory、service详解及实例代码
2016/09/21 Javascript
angular 基于ng-messages的表单验证实例
2017/05/04 Javascript
各种选择框jQuery的选中方法(实例讲解)
2017/06/27 jQuery
JS实现Cookie读、写、删除操作工具类示例
2018/08/28 Javascript
layer的prompt弹出框,点击回车,触发确定事件的方法
2019/09/06 Javascript
浏览器JavaScript调试功能无法使用解决方案
2020/09/18 Javascript
Python内置函数bin() oct()等实现进制转换
2012/12/30 Python
Python的Django框架使用入门指引
2015/04/15 Python
Python 类与元类的深度挖掘 II【经验】
2016/05/06 Python
Python获取当前页面内所有链接的四种方法对比分析
2017/08/19 Python
详解python的sorted函数对字典按key排序和按value排序
2018/08/10 Python
解决pyqt5中QToolButton无法使用的问题
2019/06/21 Python
Python中使用双下划线防止类属性被覆盖问题
2019/06/27 Python
Python编程中类与类的关系详解
2019/08/08 Python
Python 3 使用Pillow生成漂亮的分形树图片
2019/12/24 Python
python实现定时发送邮件
2020/12/23 Python
中国包裹转运寄送国际服务:Famiboat
2019/07/24 全球购物
Booking.com亚太地区:Booking.com APAC
2020/02/07 全球购物
环境工程大学生个人的自我评价
2013/10/08 职场文书
办理退休介绍信
2014/01/09 职场文书
幼师自我鉴定
2014/02/01 职场文书
《我的信念》教学反思
2014/02/15 职场文书
市语委办2016年第十九届“推普周”活动总结
2016/04/05 职场文书