Ajax is all called "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), a Web development technology that creates interactive Web applications. It contains the following kinds of technologies organically:
Definition of Ajax
Html
The code is as follows
Copy Code
remove
Requirements Description:Click the ' Remove ' link to delete the page element based on the Ajax return value.
Invalid method
The code is as follows
This article details how to use the jquery framework and the jquery address plug-in to achieve the most basic full-station AJAX dynamic loading of page content.
Case goalsThe common basic structure of the site as a case, the full station link AJAX
This articleIntroduce the Get () function first:
Url,[data],[callback],[type]
Parameter description:
URL: The URL address of the page to be loaded
Data: Key/value parameter to be sent.
Callback: callback function when load succeeds.
Type:
Cases
The code is as follows
Copy Code
var ajax = function () {};Ajax.prototype = {Request:function (method, URL, callback, Postvars) {var xhr = This.createxhrobject ();Xhr.onreadystatechange = function () {if
Fill in the data to be updated No refresh Save
?sava.php file
mysql tutorial _connect ("localhost", "root", "root") or Die (' Database Server Uid or Password error! '); mysql_select_db (' IP ') or die (' Data! '); mysql_query ("Set
Ajax File Upload progress bar page: progressbar.jsp Ajax progress BarAjax progress Bar ExampleTo run the progress bar: Server side: Progressbarservlet.java Package ajaxvalidation; Import javax.servlet.*;Import javax.servlet.http.*;Import java.io.*;
AJAX anti-Google suggest prompt box
In an HTML formThis is an HTML page. It contains a simple HTML table and links to a javascript:
Name:
suggestions:
For example the explanation-the H tml formAs you can see, the
Pure Ajax image upload, Ajax to post pictures streaming to the server.
FormData can change post data to stream transfer.
Ajax upload$ ("#upload"). Click (function () {var url = "http://mm.com/ajaxupload.php";var formData = new FormData ($ ("#frm")
The content of ajaxtest.htm on the front page is as follows: The code is as follows:Copy code This Page interacts with the background in different ways Set up a Handler. ashx page in the background as follows: The code is as follows:Copy
The main content of this section is to call the page background code method through AJAX to achieve the two-level linkage effect of the drop-down box. The implementation steps are as follows:1. Create the file Recipe24.aspx and implement the
Tip: you can modify some code before running : Ajax loading effect code :: Loading... Chargement de la page termin ?.. Tip: you can modify some code before running
AJAX cache is intended to improve AJAX efficiency and reduce the pressure on the server. However, improper use may lead to unexpected results. There are several solutions to disable Ajax caching:1. Add the header ("Cache-Control: no-cache,
We have always used the string sharding method to process the data returned by AJAX. Today, baidu finds that eval () can be used.For example: eval (http_request.responseText );Eval () functionJavaScript has many tips to make programming easier.One
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