JSON advanced Article 2 transfer JSON data using AJAX
Source: Internet
Author: User
The previous article "JSON advanced article 1 using JSON in PHP and javascript" demonstrates how to use JSON data in PHP and javascript, this article describes how to use AJAX to obtain JSON data to dynamically generate titles and prompt statements. This technology sends requests to the website background on a static page... syntaxHighlighte's previous article "JSON advanced article 1 using JSON in PHP and javascript" demonstrates how to use JSON data in PHP and javascript, this article describes how to use AJAX to obtain JSON data to dynamically generate titles and prompt statements. This technology is effective when a static page requests dynamic data from the website background. because the website homepage has a large volume of traffic, the whole page must be statically processed, however, some data on this page must be updated in real time. in this case, AJAX can be used in static pages to request the JSON data generated in real time in the background. For more information about AJAX technology, see PHP advanced AJAX technology for MySql database access. here we will detail how to use AJAX to transmit JSON data.
This example contains json2.php and json2.html. a button is displayed on json2.html. after you press the button, an AJAX request is sent to obtain the data returned by json2.php.
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