ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
[TOC] ## $.ajax [[jQ官方-ajax](https://api.jquery.com/jQuery.ajax)] [[jQ官方-Category ajax](https://api.jquery.com/category/ajax/)] ## jqXHR (jQuery XMLHttpRequest object) [[jQ官方-jqXHR](http://api.jquery.com/Types/#jqXHR)] ## jQuery.post() Load data from the server using a HTTP POST request. * **语法**: jQuery.post( url [, data ] [, success ] [, dataType ] ) * **Returns** : `jqXHR` ## jQuery.get() Load data from the server using a HTTP GET request. * **语法**: jQuery.get( url [, data ] [, success ] [, dataType ] ) * **Returns** : `jqXHR` ## .load() Load data from the server and place the returned HTML into the matched element. * **语法**: .load( url [, data ] [, complete ] ) * **Returns** :`jQuery` ## .serialize() Encode a set of form elements as a string for submission. ## serializeArray() Encode a set of form elements as an array of names and values. ## $.when().then() ~~~js $.when( ajaxFn1, ajaxFn2, ... ajaxFnN ).then( successFn(res1,res2,...,resN){ ...... }, failFn(){ ...... } ); ~~~