It is not surprising that today's Web sites have asynchronous requests and even many asynchronous requests in a Web page. Ajax has become the basic function of the site now, making Web applications closer to desktop applications.
However, no matter
Ajax pagination Tutorial The front-end code, the HTML part we do not speak. Start the contents of the script directly. First we define 4 global variables, respectively:
All_page: Total pages, basis for creating page numbersAll_record: Total number
A lot of data have said that the parameters of the Get method are limited, the length of the parameters of the Post method is unlimited, which is also the advantage of the post compared to got.
Using the Post method in Ajax, the normal parameter
Front.
Ajax is shorthand for asynchronous JavaScript and XML, the Chinese translation is asynchronous JavaScript and XML, this technology can request additional data to the server without unloading the page, will bring a better user experience.
jquery Ajax in the frequent request data, or repeated requests for data, there is a situation, that is not the normal IE browser, IE browser will set the cache, resulting in a second request will not refresh, the system reported 304 not modify,
An overview of Ajax
1, Ajax is asynchronous ([ə ' sɪŋkrənəs) JavaScript XML shorthand, not a new technology, but the comprehensive utilization of existing technologies. This technology can request additional data to the server without refreshing
1. Preparing to send data to the server
One of the most common uses of Ajax is to send data to the server. The most typical scenario is to send form data from the client, which is the value entered by the user in each INPUT element contained in the
Introduction to Ajax
Ajax, "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), refers to a web development technology that creates interactive Web applications.
AJAX = Asynchronous JavaScript and XML (a subset of standard generic
Let me first tell you my demand: After the AJAX request, the backstage pass back the following JSON data.
The specific implementation code is as follows:
JavaScript code
{"
data": [
{"id]:" 1 "," Name ":" Select a "," value ":" A "},
{"
Jsonp's call, met today, just tidy up a bit.
change text via AJAX Change content 01 Change content 02getjson
Above this Ajax Jsonp way to get data across the domain is a simple example of the small series to share all the
Overriew:onreadystatechange is assigned a value by the callback function, it can implement the asynchronous call, the callback function directly manipulate the DOM, you can implement local refresh. So how does XMLHttpRequest onreadystatechange know
Ajax is all called "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), a Web development technology that creates interactive Web applications. Ajax technology is a collection of all the techniques currently available in the browser
main functions:
Copy Code code as follows:
function GetObject (objectId) {
if (document.getElementById && document.getElementById (objectId)) {
The Consortium DOM
return document.getElementById (OBJECTID);
}
else if (document.all &&
First Ajax does not refresh the page submission data, is now widely used, nonsense not to say immediately into the theme!!
Basically the information the browser can receive, Ajax can receive, ex: strings, HTML tags, CSS tags, XML format content,
Plugin Name: Chatroom
Plugin version: v1.0
Plugin Author: Clear
Plugin Support blog version: PJBlog2 v2.5.0125
Version Description:
Enable PJBLOG2 to support users to communicate immediately;
Ajax no refresh, can be instant communication in any
First to show you the effect of the picture:
Effect Demo
This example is another way to display pagination, not to hide what is not displayed
The database structure is the same as "Ajax paging"
JavaScript Code
xml/html Code
In the use of Ajax process, sometimes always encounter some problems, browser compatibility, coding, ie under the special processing, and so on, and occasionally make people confused, here are some tips, perhaps some use.
Using JavaScript libraries
When using AJAX technology, we usually do not have to refresh the page to submit data with the same URL to get data when it will be found to be the previous data ~ so that the client side to bring illusion ~ ~ The following methods can be used to
AJAX, asynchronous Javascript and XML, enables no Refresh Status update page and asynchronous commit
Advantages:
No plug-in support requiredThe user experience is very goodImprove Web program performanceEase the burden on servers and broadband
Ajax interacts with mysql DATA to implement the message board function.
Recently, I made a small demo to implement data interaction between Ajax and MySQL. jq is used in js, PHP is used in the background, and mysql is used in the database, A node +
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