欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

AngularJS如何實(shí)現(xiàn)點(diǎn)擊按鈕獲取驗(yàn)證碼功能-創(chuàng)新互聯(lián)

這篇文章將為大家詳細(xì)講解有關(guān)AngularJS如何實(shí)現(xiàn)點(diǎn)擊按鈕獲取驗(yàn)證碼功能,小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,希望大家閱讀完這篇文章后可以有所收獲。

讓客戶滿意是我們工作的目標(biāo),不斷超越客戶的期望值來(lái)自于我們對(duì)這個(gè)行業(yè)的熱愛(ài)。我們立志把好的技術(shù)通過(guò)有效、簡(jiǎn)單的方式提供給客戶,將通過(guò)不懈努力成為客戶在信息化領(lǐng)域值得信任、有價(jià)值的長(zhǎng)期合作伙伴,公司提供的服務(wù)項(xiàng)目有:申請(qǐng)域名、網(wǎng)頁(yè)空間、營(yíng)銷軟件、網(wǎng)站建設(shè)、淅川網(wǎng)站維護(hù)、網(wǎng)站推廣。

html :樣式采用了sui框架的樣式,請(qǐng)自行引入查看,AngularJS,自己引入,

<div ng-controller="forGetPassword" ng-app="routingDemoApp">
  <form novalidate name="forget">
    <header class="bar bar-nav">
      <a href="javascript:history.go(-1);" rel="external nofollow" class="ui-header-btn ui-header-btn-sm"></a>
      <h2 class='title'>忘記密碼</h2>
    </header>
    <div class="gorgetpassowrd">
      <ul>
        <li>
          <input type="number" placeholder="請(qǐng)輸入您的手機(jī)號(hào)碼" required ng-model="mobile" name="mobile" ng-pattern="/^1[3|4|5|7|8]{1}[0-9]{9}$/">
        </li>
        <div ng-show="forget.mobile.$dirty && !forget.mobile.invalid">
          <p class="textinfo" ng-show="forget.mobile.$error.required">手機(jī)號(hào)碼必填</p>
          <p class="textinfo" ng-show="forget.mobile.$error.pattern">手機(jī)號(hào)碼格式不正確</p>
        </div>
        <li>
          <input type="number" placeholder="驗(yàn)證碼" name="code" ng-model="code" required ng-minlength="6" ng-maxlength="6">
          <a class="getCode paraclass" ng-click="getCode()" ng-bind="paracont" ng-disabled="paraevent"></a>
        </li>
        <div ng-show="forget.code.$dirty && !forget.code.invalid">
          <p class="textinfo" ng-show="forget.code.$error.required">驗(yàn)證碼必填</p>
          <p class="textinfo" ng-show="forget.code.$error.minlength">驗(yàn)證碼為6位數(shù)字</p>
          <p class="textinfo" ng-show="forget.code.$error.maxlength">驗(yàn)證碼為6位數(shù)字</p>
        </div>
      </ul>
      <p class="textinfo" ng-bind="mobiletest"></p>
      <a class="button button-warning next-btn">下一步</a>
    </div>
  </form>
    <div class="changePwd">
      <form novalidate name="changePwd">
      <ul>
        <li>
          <input type="password" placeholder="請(qǐng)輸入新密碼" required ng-model="newPwd" name="newPwd" ng-pattern="/^[a-zA-Z0-9]{6,20}/">
        </li>
        <div ng-show="changePwd.newPwd.$dirty && !changePwd.newPwd.invalid">
          <p class="textinfo" ng-show="changePwd.newPwd.$error.required">密碼必須填</p>
          <p class="textinfo" ng-show="changePwd.newPwd.$error.pattern">密碼由8-20位數(shù)字和字母組成</p>
        </div>
        <li>
          <input type="password" placeholder="再次輸入新密碼" name="resetPwd" ng-model="resetPwd" >
        </li>
        <div ng-show="changePwd.newPwd.$valid">
          <p class="textinfo" ng-show="newPwd != resetPwd">兩次輸入的密碼不一致</p>
        </div>
      </ul>
      <a class="button button-warning next-btn">確認(rèn)修改</a>
      </form>
    </div>
</div>
<script>
var myCtrl = angular.module('routingDemoApp', ['ngRoute','infinite-scroll'])
myCtrl.controller('forGetPassword',function($scope,$interval){
  $scope.paracont = "獲取驗(yàn)證碼";
  $scope.paraclass = "but_null";
  $scope.paraevent = true;
  var second = null,timePromise = undefined;
  $scope.getCode =function(){
    var mobile = $scope.mobile;
    if(second === null){
      second = 60;
      if(mobile == undefined || mobile ==""){
        $scope.mobiletest = "請(qǐng)輸入手機(jī)號(hào)碼";
        return false;
      }else{
        $scope.mobiletest = "";
        timePromise = $interval(function(){
          if(second<=0){
            $interval.cancel(timePromise);
            timePromise = undefined;
            second = null;
            $scope.paracont = "重發(fā)驗(yàn)證碼";
            $scope.paraclass = "but_null";
            $scope.paraevent = true;
          }else{
            $scope.paracont = second + "s";
            second--;
          }
        },1000,100);
      }
    }else{
      return false;
    }
  }
});
</script>

關(guān)于“AngularJS如何實(shí)現(xiàn)點(diǎn)擊按鈕獲取驗(yàn)證碼功能”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,使各位可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),請(qǐng)把它分享出去讓更多的人看到。

另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)建站chinadenli.net,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。

新聞標(biāo)題:AngularJS如何實(shí)現(xiàn)點(diǎn)擊按鈕獲取驗(yàn)證碼功能-創(chuàng)新互聯(lián)
轉(zhuǎn)載源于:http://chinadenli.net/article30/ddeppo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護(hù)營(yíng)銷型網(wǎng)站建設(shè)、域名注冊(cè)網(wǎng)站排名、動(dòng)態(tài)網(wǎng)站響應(yīng)式網(wǎng)站

廣告

聲明:本網(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)

成都網(wǎng)頁(yè)設(shè)計(jì)公司