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);     

                }         

        });

      }

  • 相关阅读:
    POJ1239
    HDU 2829 四边形不等式优化
    返回数字二进制的最高位位数o(n)
    矩阵快速幂 模板
    HDU4718 The LCIS on the Tree(LCT)
    HDU4010 Query on The Trees(LCT)
    HDU3487 Play With Chains(Splay)
    CF444C DZY Loves Colors
    HDU4836 The Query on the Tree(树状数组&&LCA)
    HDU4831&&4832&&4834
  • 原文地址:https://www.cnblogs.com/ths0201/p/5305038.html
Copyright © 2011-2022 走看看