h5 php登录注册页面验证,H5制作一个注册页面的代码实例

HTML5写的注册页面,正在学习html5的朋友可以参考下

代码如下:

register.html

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 = "高";

}

}

<

for

m id="f1"

action

="register.html" method="post">

会员注册

padding

="5px">

员工编号:

require

d/>

密 码:

onkeyup

="passwd()"/>

密码确认:

生 日:

性 别:

邮 箱:

手 机:

地 址:

list

="l"/>

上海

北京

江苏

郑州

深圳

个人网页:

起床时间:

onblur

="pro()"/>

头像:

onchange

="show()"/>

width

="60"

height

="60" />

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;

}

}

允许注册

许可证

信息

注册许可信息

验证码

var span = document.getElementById("span");

span.innerHTML=Math.floor(Math.random());

onclick

="window.location.replace('login.html')" id="btn1"

onmousemove

="changeBgColor('btn1')"

onmouseout

="recoverBgColor('btn1')" class="submit" />

代码如下: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

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

if(!arrSon[i].checked) {

cbAll.checked = false; return;

} }

cbAll.checked = true;

}

function ChkOppClick(sonName){

var arrSon = document.getElementsByName(sonName);

for(i=0;i

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

9e221aa3009151f9f3cb163e43437df7.png

【相关推荐】

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值