//get Way to submit:Xmlhttp.open ("Get", "testservlet?name=" +username,true);
Xmlhttp.send (NULL);
Post-mode requested codeXmlhttp.open ("POST", "Testservlet", true);Post method requires you to set the HTTP request headers
When requesting the server to stop, the browser prompts net::err_connection_refused
jquery Event Three callback events: Success success error complete as long as the request completes, whether the return succeeds or fails
Try to catch this kind of
One, JavaScript cross-domain access
1. Set the Document.domain value of the access page and the page being visited.
2, use the IFRAME to connect two domains of the page.
II. Ajax cross-domain access
1, using the script tag to achieve
The
Introduction to the AJAX frameworkSo far, you've probably noticed that there's a lot of trouble with Ajax programming. If you want to support multiple browsers (now who still support only one browser?) Will undoubtedly encounter incompatibility
what is Ajax technology.
Ajax is all called "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML), a Web development technology that creates interactive Web applications. It includes the following technologies: Web Standard (standards-
The Ajax method parameters in jquery have the following meanings:
1.url:
Requires that the requested address be sent for a string type argument, which defaults to the current page address.
2.type:
A parameter of type string is required, and the
Ajax is not a technology. It is actually a combination of several powerful technologies that have been in their field. Ajax Mixed up:
* Based on XHTML/CSS
* Dynamic display and interaction by Dom (Document Object Model)
* Data exchange and
Combine some of the documentation to explore where the Ajax magic is.
Ajax (that is, asynchronous JavaScript and XML) is a Web application development tool that uses client script to exchange data with a Web server. Therefore, you can dynamically
Ajax Principle-the XMLHttpRequest object meaning of native JS
Ajax is shorthand for asynchronous JavaScript + XML, a technology that can request additional data from the server without uninstalling the page, bringing a good user experience. The
A screenshot of an Ajax method in the actual combat project
Knowledge Point One: jquery initializes the page mode.
Knowledge Point two: jquery traversal data Way
For In loop:
For In loop for
(x in Obj.bkdata) {
//x representation
1. Before and after the end to do a good job of security checks
Can not rely on the front-end to do security verification work, the back end must have a filtration mechanism to test the data from the front. Because Ajax will also receive data from
One: Effect preview
Description: There is no layout to do any style, just a simple implementation of the function only
1 username and password are null:
2 username and password is incorrect:
3 username and password entered correctly:
Ajax Cross-domain Access is an old problem, there are many solutions, more commonly used is the Jsonp method, the Jsonp method is an unofficial method, and this method only supports get way, not as safe as post method.
Even if you use the Jsonp
Recently in the review of Ajax technology, we picked up the same year, "Ajax classic Case Development Daquan" to brush up. Found that there are some errors, it is pointed out now, this can help after the scholar less detours. The main technologies
jQuery Load () method
The JQuery load () method is a simple but powerful AJAX method.
The load () method loads the data from the server and puts the returned data into the selected element. Syntax:
$ (selector). Load (url,data,callback);
The
In the actual application, the front-end separation is more and more common, the frontend is responsible for the routing between the pages, the need for data, send AJAX requests can be. But I hope that when using AJAX, you can control the page jump,
FileUpload is a jquery ajax file upload Plugin
Download down a lot of things, a lot of is not necessary, here only to talk about the minimum level of application
First, rely on JS:
copy Code is integral (Jquery.ui.wiget.js does not need to
has just completed a feature that jams today. In short, it is a delete operation that implements a checkbox multi-select value. I'm so busy that I finally got it done. JS as follows: (please leave a message if you do not understand)function All_del (
Preface
1. Load Request2. Error handling3. Request Global Events
In the Ajax lesson, we learned about the most basic asynchronous processing methods. In this chapter, we'll look at some of the global request events, cross-domain processing, and
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