$. Ajax ({
URL: encodeuri ("Here is the address you want to request "),
Data: {name: "John", Location: "Boston"}, // in the form of a key-Value Pair "name = John & location = Boston ", // If yes
Async: false, // The default value is true asynchronous. At this time, if Ajax is not returned, the following JS will be executed (the background action will be returned). On the set-top box, A new sessionid is generated during synchronization, but not asynchronously.
Cache: false, // The default value is true. When data cannot be refreshed, change it to false.
Datatype: "JSON", // common
Success: function (data ){
For (INT I = 0; I <data. length; I ++) {// A JSON array passed through the loop background
VaR datas = data [I];
Alert (datas. firstname );
Alert (datas. lastname );
Alert (datas. Email );
}
}
});
See: http://www.w3school.com.cn/jquery/ajax_ajax.asp