中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

layui發送手機驗證碼

發布時間:2020-07-11 13:02:28 來源:網絡 閱讀:2977 作者:IT阿飛 欄目:web開發
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>登入</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="fly,layui,前端社區">
    <meta name="description" content="Fly社區是模塊化前端UI框架Layui的官網社區,致力于為web開發提供強勁動力">
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css">
    <link rel="stylesheet" href="__PUBLIC__/res/css/global.css">
</head>
<body>

<include  file="Common/head"  />

<div class="main layui-clear">

    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                <li class="layui-this">登入</li>
                <li><a href="reg.html">注冊</a></li>
            </ul>
            <div class="layui-form layui-tab-content" id="LAY_ucm" >
                <div class="layui-tab-item layui-show">
                    <div class="layui-form layui-form-pane">
                        <form method="post" action="{:U('Login/check_login')}">
                            <div class="layui-form-item">
                                <label for="L_phone" class="layui-form-label">手機號</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_phone" name="phone" required lay-verify="phone" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label for="L_vercode" class="layui-form-label">圖片驗證碼</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="請輸入圖片的驗證碼" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid" >
                                    <span ><img src="{:U('Common/yzm')}" onclick="this.src='{:U(\'Common/yzm\')}'" alt=""></span>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <button type="button" class="layui-btn" id="send_phone" ><span id="send_str">發送手機驗證碼</span>&nbsp;&nbsp;<span id="p_djs">(<span id="djs">0</span>)</span></button>

                                </span></div>
                            <div class="layui-form-item">
                                <label for="L_pass" class="layui-form-label">手機驗證碼</label>
                                <div class="layui-input-inline">
                                    <input type="password" id="L_pass" name="pass" required lay-verify="required" autocomplete="off" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <button class="layui-btn"  lay-filter="*" lay-submit>立即登錄</button>
                                <!--<span >-->
                  <!--<a href="forget.html">忘記密碼?</a>-->
                </span>
                            </div>
                            <!--<div class="layui-form-item fly-form-app">-->
                                <!--<span>或者使用社交賬號登入</span>-->
                                <!--<a ></a>-->
                                <!--<a ></a>-->
                            <!--</div>-->
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

</div>

<include  file="Common/foot"  />
<script>

    $ = layui.$;

    $("#p_djs").hide();

    $('#send_phone').on('click', function(){
        $("#send_str").text("已發送手機驗證碼");

        var phone = $('#L_phone').val();
        var yzm = $('#L_vercode').val();

        if(phone == ''){
            layer.msg('手機號不能為空!',{icon:2});
            return false;
        }
        if(yzm == ''){
            layer.msg('圖形驗證碼不能為空!',{icon:2});
            return false;
        }
        if($('#djs').text()!=0){
            layer.msg('手機驗證碼已發送!',{icon:2});
            return false;
        }
        $("#djs").text(60);
        $("#p_djs").show();
        $.post("{:U('Common/checkverify')}",{code:yzm},function(data){
            if(data==200){
                $("#p_djs").show();
                var setTime;
                var time=parseInt($("#djs").text());
                setTime=setInterval(function(){
                    if(time<=0){
                        $("#send_str").text("重新發送手機驗證碼");
                        $("#djs").text(0);
                        $("#p_djs").hide();
                        clearInterval(setTime);
                        return;
                    }
                    time--;
                    $("#djs").text(time);
                },1000);
            }else{
                layer.msg('圖形驗證碼不正確!',{icon:2});
                $("#p_djs").hide();
                $("#djs").text(0);
                $("#send_str").text("重新發送手機驗證碼");
            }


        });
    });



</script>

</body>
</html>


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

民丰县| 读书| 辽源市| 四平市| 平凉市| 云南省| 乌鲁木齐县| 青神县| 讷河市| 红桥区| 三台县| 洪江市| 措勤县| 喀喇沁旗| 大竹县| 普兰店市| 新化县| 隆子县| 玛沁县| 山西省| 临邑县| 盘锦市| 新昌县| 襄城县| 宁都县| 太和县| 普洱| 巴楚县| 苍溪县| 昭平县| 韩城市| 南充市| 东海县| 仁布县| 如皋市| 刚察县| 新昌县| 玉屏| 望江县| 龙门县| 怀来县|