!DOCTYPE html>
Document
body {
background: #F6F9FB;
}
label {
width: 40px;
display: inline-block;
}
span {
color: red;
}
.container {
position: relative;
margin: 100px auto;
width: 600px;
height: 400px;
padding-left: 350px;
line-height: 40px;
background: white;
box-shadow: -10px 10px 10px rgb(232,235,236);
}
span {
margin-left: 30px;
font-size: 12px;
}
.wrong {
color: red
}
.right {
color: green;
}
.defau {
width: 200px;
height: 20px;
}
.de1 {
background-position: 0 -20px;
}
.button{
margin-left: 100px;
}
h3{
text-align: center;
padding-top: 20px;
margin-right: 50px;
margin-top: 50px;
}
label{
font-size: 12px;
}
.yzm{
width: 100px;
height: 30px;
position: absolute;
left: 1050px;
top: 490px;
}
.body{
position: absolute;
}
label{
margin-top: 25px;
}
用户注册
用户名:
手机
邮箱
座机
验证码
var verifyCode = new GVerify("v_container");
document.getElementById("my_button").onclick = function(){
var res = verifyCode.validate(document.getElementById("code_input").value);
if(res){
alert("注册成功");
window.location.href='123.html';
}else{
alert("注册失败");
}
};
//用户名
checkInput(my$("username"),/^[a-zA-Z0-9_-]{4,16}$/);
//手机
checkInput(my$("phone"),/^\d{11}$/);
//邮箱
checkInput(my$("e-mail"),/^[0-9a-zA-Z_.-]+[@][0-9a-zA-Z_.-]+([.][a-zA-Z]+){1,2}$/);
//座机号码
checkInput(my$("telephone"),/^\d{3,4}[-]\d{7,8}$/);
function checkInput(input,reg) {
input.οnblur=function () {
if(reg.test(this.value)){
this.nextElementSibling.innerText="正确了";
this.nextElementSibling.style.color="green";
}else{
this.nextElementSibling.innerText="输入错误";
this.nextElementSibling.style.color="red";
}
};
}
我不懂有什么方法能在不应数据库的情况下从另外一个网页调用数据.