. Ajax details

Source: Internet
Author: User

$. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.