欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

注册

程序员文章站 2022-07-13 16:54:45
...
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" />
    <title>Title</title>
    <style>
        .pg-content{
            width: 1200px;
            height: 650px;
            margin-left: 7%;
            margin-top: 4%;
            border: solid red;
        }
        .pg-left{
            height: 650px;
            width: 550px;
            border-right: solid red;
            float: left;
        }
        .pg-right{
            height: 650px;
            width: 648px;
            float: left;
        }
        .pg-p{
            font-weight: bold;
            font-size: larger;
            color: blue;
            text-align: center;
            padding-top: 30px; ;
            padding-bottom: 30px;
        }
        .pg-div{
            padding-left: 80px;
            padding-bottom: 30px;
        }
        .pg-span{
            color: red;
            font-weight: bold;
            font-size: small;
            padding-left: 15px;
        }
        .hide{
            display: none;
        }
    </style>
</head>
<body>
<div class="pg-content">
    <div class="pg-left">
        <p class="pg-p">欢迎注册</p>
        <div class="pg-div">
            <label for="i1">用户名:</label>
            <input id="i1" type="text">
            <span class="pg-span">用户名不符合规范</span>
        </div>
        <div class="pg-div">
            <label for="i2">密&nbsp&nbsp&nbsp码:</label>
            <input id="i2" type="password">
            <span class="pg-span">密码不符合规范</span>
        </div>
        <div class="pg-div">
            <label for="i3">再输入:</label>
            <input id="i3" type="password">
            <span class="pg-span">密码不相同</span>
        </div>
        <div class="pg-div">
            <label for="i4">邮&nbsp&nbsp&nbsp箱:</label>
            <input id="i4" type="text">
            <span class="pg-span">邮箱格式错误</span>
        </div>
        <div class="pg-div">
            <label for="i5">电话号:</label>
            <input id="i5" type="text">
            <span class="pg-span">电话号格式错误</span>
        </div>
        <div class="pg-div">
            <label for="i6">座机号:</label>
            <input id="i6" type="text">
            <span class="pg-span">座机号格式错误</span>
        </div>
        <div class="pg-div">
            <label for="i7">身份证:</label>
            <input id="i7" type="text">
            <span class="pg-span">身份证号格式错误</span>
        </div>
        <div class="pg-div">
            <input type="checkbox">
            同意
            <a style="color: blue;">《安全条款》</a>
        </div>
        <div class="pg-div">
            <input id="i8" type="button" value="注册">
        </div>
    </div>
    <div class="pg-right">

    </div>
</div>
<script src="jquery-1.12.4.js"></script>
<script>
    $('#i8').click(function () {
        alert('注册成功');
    });
    var obj1=$('#i1');
    value1=obj1.value();
    if (value1.length>10||value1.length<=0){
        obj1.nextSibling.removeClass('hide');
    }
</script>
</body>
</html>

 

相关标签: 注册