zoukankan      html  css  js  c++  java
  • jqAjax

     function jqAjax(type, url, dataType, deLoader, fn, d) {   

           var data, flag = false;

           $.ajax({        

             url: url,   

           data: typeof d !== 'undefined' && d[0],     

            //async:false,           

             type: type,          

            dataType: dataType,    

             contentType: typeof d !== 'undefined' && d[1],      

             beforeSend: function () {            

             // if(loadfn) {loadfn();}                 },    

              success: function (d) {            

              data = d;                     if (data.length == 0) { flag = true; }       

              },    

              complete: function (d) {      

                   if (deLoader) { deLoader; }            

                   if (fn) { fn(data); }         

                return flag;         

      },          

               error: function (e) {     

                   console.log('Ins Error At Times!', e);     

                }         

        });

      }

  • 相关阅读:
    Mac电脑上的软件以及作用整理
    sed命令在mac和linux下的区别
    gin框架开启web跨域
    Mac下输入特殊字符的总结
    4月4悼念日 多数app 或者网站变成灰色的实现效果
    Mqtt 客户端多主题订阅
    paho.mqtt.golang--option.go 源码解析
    MQTT服务器(Broker)
    asdine/storm学习笔记
    vuex基本使用教程
  • 原文地址:https://www.cnblogs.com/ths0201/p/5305038.html
Copyright © 2011-2022 走看看