<!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,前端社區(qū)"> <meta name="description" content="Fly社區(qū)是模塊化前端UI框架Layui的官網(wǎng)社區(qū),致力于為web開發(fā)提供強(qiáng)勁動(dòng)力"> <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">注冊(cè)</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">手機(jī)號(hào)</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">圖片驗(yàn)證碼</label> <div class="layui-input-inline"> <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="請(qǐng)輸入圖片的驗(yàn)證碼" 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">發(fā)送手機(jī)驗(yàn)證碼</span> <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">手機(jī)驗(yàn)證碼</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>或者使用社交賬號(hào)登入</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("已發(fā)送手機(jī)驗(yàn)證碼"); var phone = $('#L_phone').val(); var yzm = $('#L_vercode').val(); if(phone == ''){ layer.msg('手機(jī)號(hào)不能為空!',{icon:2}); return false; } if(yzm == ''){ layer.msg('圖形驗(yàn)證碼不能為空!',{icon:2}); return false; } if($('#djs').text()!=0){ layer.msg('手機(jī)驗(yàn)證碼已發(fā)送!',{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("重新發(fā)送手機(jī)驗(yàn)證碼"); $("#djs").text(0); $("#p_djs").hide(); clearInterval(setTime); return; } time--; $("#djs").text(time); },1000); }else{ layer.msg('圖形驗(yàn)證碼不正確!',{icon:2}); $("#p_djs").hide(); $("#djs").text(0); $("#send_str").text("重新發(fā)送手機(jī)驗(yàn)證碼"); } }); }); </script> </body> </html>
本文名稱:layui發(fā)送手機(jī)驗(yàn)證碼
分享地址:http://m.rwnh.cn/article26/igjgjg.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供搜索引擎優(yōu)化、關(guān)鍵詞優(yōu)化、響應(yīng)式網(wǎng)站、網(wǎng)站內(nèi)鏈、品牌網(wǎng)站設(shè)計(jì)、面包屑導(dǎo)航
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)