SUMMARY request processing ajax

/ * * 
 * Do not care about the form of parameter passing and parameter returned. 
 * / 
URL = a CTXPATH + '/ CCB / XXX' ; 
$ .get (URL); 
$ .post (URL);
/ * * 
 * Common form. 
 * / 
Var url = "" ; 
$ .ajax ({ 
        url: url,                            // ajax the URL of address 
        of the type: "",                            // ajax submission POST, GET ...... 
        dataType: "",                        // transfer type xml, json ... ... 
        the async: to true ,                         // Ajax cross-domain parameters 
        Data: {   
            Data: "parameter" // if no transmission parameters, data attributes have a structure, if there is transmission parameters, receives the attribute parameters to the rear end corresponding         }, 
        Success: function (Data) { 
            the console.log (Data);                               
            
// Client console output 
        }, 
        error: function (Data) { 
        } 
});

 

Guess you like

Origin www.cnblogs.com/tanjiyuan/p/11359527.html