表单验证--插件-1.0.1

1、html代码

<div class="reg">
        <form action="" method="post" id="regForm" name="regForm" onsubmit="return false;">
            <h1 class="reg-tit">10秒注册账号h1>
            <p id="fv_content">p>
            <ul class="clearfix">
                <li class="fl">
                    <label class="fl">游戏账号label>
                    <input type="text" maxlength="16" value="" id="user_name" name="user_name" class="fl inp" autocomplete="off" tabindex="1" datatype="/^[a-z][a-z0-9]{5,15}$/" url="/do/check_default.php" error="6-16位小写字母或数字,首位为字母" />
                    <div id="user_nameTip" class="onShow"> div>
                li>
                <li class="fl">
                    <label class="fl">登录密码label>
                    <input type="password" value="" maxlength="16" id="user_pwd1" name="user_pwd1" class="fl inp" tabindex="2" datatype="/[a-z0-9]{8,16}/" error="8-16位字母或数字"/>
                    <div id="user_pwd1Tip" class="onShow"> div>
                li>
                <li class="fl">
                    <label class="fl">真实姓名label>
                    <input id="user_realname" class="fl inp" type="text" autocomplete="off" maxlength="4" name="user_realname" tabindex="3" datatype="/^([\u4E00-\u9FA5]+,?)+$/" error="请输入真实姓名"/>
                    <div id="user_realnameTip" class="onShow"> div>
                li>
                <li class="fl">
                    <label class="fl">身份证号label>
                    <input value="" maxlength="18" id="user_idcard" name="user_idcard" class="fl inp" tabindex="4" datatype="idcardVel" error="请输入身份证以保证合法"/>
                    <div id="user_idcardTip" class="onShow"> div>
                li>
                <li class="fl">
                    <label class="fl">安全邮箱label>
                    <input type="text" value="" maxlength="50"  id="user_email" name="user_email" class="fl inp" tabindex="5" datatype="emailVel" error="请输入正确邮箱"/>
                    <div id="user_emailTip" class="onShow"> div>
                li>
                <li class="fl">
                    <label class="fl">验证码label>
                    <input type="text" name="user_checkcode" id="user_checkcode" maxlength="4" class="fl inp" tabindex="6"/>
                    <img id="id_randimage" alt="看不清?重新换张!" class="fl" style="display:none;"/>
                li>
            ul>
            <p class="reg-agree"><input id="check_agree" type="checkbox" name="check_agree" checked="checked"/> 查看并同意<a href="" target="_blank">《服务协议与隐私声明》a>p>
            <input type="submit" name="regsubmit" id="regsubmit" class="block public reg-submit" value="" title="立即注册"/>
            <input type="hidden" value="ajax" id="submitType" name="submitType" /> 
            <input type="hidden" name="act_id" id="act_id" value="11111111111"/>
            <button id="xsubmit" value="/do/reg_server_j.php" style="display:none">button>
        form>
    div>
    <div class="reg-ok hide">
        <h1 class="reg-tit">注册成功h1>
        <div class="public reg-ok-pic">div>
        <h2>登录游戏 领取588大礼包h2>
    div>

2、js验证代码



 

你可能感兴趣的:(表单验证--插件-1.0.1)