<blockquote id="15iad"><noscript id="15iad"><xmp id="15iad">
<td id="15iad"><strike id="15iad"></strike></td><track id="15iad"><strike id="15iad"><tt id="15iad"></tt></strike></track>

<table id="15iad"></table>

    1. 0712-2888027 189-8648-0214
      微信公眾號

      孝感風信網絡科技有限公司微信公眾號

      當前位置:主頁 > 技術支持 > Javascript/JQuery > Ajax請求綁定手機號彈窗實現的代碼片段

      Ajax請求綁定手機號彈窗實現的代碼片段

      時間:2023-07-28來源:風信官網 點擊: 386次
      Ajax請求綁定手機號彈窗實現的代碼片段,以下代碼為項目開發中的片段,實現方法思路僅供參考。

      // 綁定手機號彈窗
          $(".get-phone").on("click", ".c-btn,.close,.phone-bg", function () {
              $(".get-phone").hide();
          });
          /**
           * ajax方法封裝
           * @param url
           * @param data
           * @param type
           * @param success
           * @param error
           * @param beforeSend
           * @param async
           */
          var ajax = function (url, data, type, success, error, beforeSend, async) {
              $.ajax({
                  url: url,
                  data: data,
                  dataType: 'JSON',
                  type: type,
                  success: function (res) {
                      layer.closeAll();
                      success(res);
                  },
                  error: function () {
                      if (typeof error === 'function') {
                          error();
                      } else {
                          layer.msg('請求錯誤');
                      }
                  },
                  beforeSend: function () {
                      if (typeof beforeSend === 'function') {
                          beforeSend();
                      } else {
                          var index = layer.load(1, {
                              shade: [0.1, '#fff'] //0.1透明度的白色背景
                          });
                      }
                  }
              });
          };

          $('#registerBtn').on('click', function () {
              $('#registerModal').removeClass('hide');
          });
          //隱藏模態框
          $('span[data-bind-bs="hideModal"]').on('click', function () {
              var _this = $(this);
              _this.parents('div.hkt-win').addClass('hide');
          });

          $('.show-input > span').click(function () {
              $('.show-input').hide();
              $('.nav').fadeIn(800);
              $('.click-seek').show();
          });
      熱門關鍵詞: Ajax 綁定手機號 彈窗實現
      欄目列表
      推薦內容
      熱點內容
      展開
      96精品专区国产在线观看高清
      <blockquote id="15iad"><noscript id="15iad"><xmp id="15iad">
      <td id="15iad"><strike id="15iad"></strike></td><track id="15iad"><strike id="15iad"><tt id="15iad"></tt></strike></track>

      <table id="15iad"></table>