The Ajax submit form allows you to serialize the form form and then submit the data to the background, such as:
$.ajax ({url: "http://localhost:8080/", type: "POST", Data: $ (' #postForm '). Serialize (), Su Ccess:function (data) {}, Error:function
The div tag is used to generate a DIV element on the page, but the DIV element content is not static content but gets the data from the server, so that the div can get the data on the server, you must specify an href attribute for the div tag, this
jquery is very well encapsulated in asynchronous submissions and is very cumbersome to use Ajax directly, and jquery simplifies our operations without considering the surprise of browsers.
Recommend a good jquery Ajax instance article, forget to go
Reprint an article. The original text is as follows:
Projects sometimes need to use some Ajax effect, because it is simpler, there is no ajax.net to use something like that, the handwriting code is realized. 、
The next day, someone reported me an
AJAX is an acronym for Asynchronous JavaScript and XML. Essentially, a piece of JavaScript can create an HTTP request and directly update a part of the page without a post or get request like normal, and refresh the entire page. Even better, a page
Ajax (Ajax development)
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
$.ajax ({
type: "POST",
URL://Your requestor page, whatever.
async:false,//sync: Meaning is when there is a return value will not be followed by the JS program.
The target address of your jump ';
}
}
Ajax only
When using Ajax, you may encounter inexplicable errors, and you need to learn to use the developer tools to view and locate and solve problems. Related to this issue, you can also refer to: POST Bad request the request sent by the client is
1. Introduction of documents:
2. I realize the function of the province, city, district, Street, (the street needs more choice)
When the Drop-down box is initialized, the list of streets with multiple selection boxes in different regions is
After using Microsoft's AJAX controls, you want to implement pop-up statements that no longer use Response.Write (" ");
and to use Scriptmanager.registerclientscriptblock (UpdatePanel1, this. GetType (), "Click", "Alert (' success. ') ', true);
This is a question that is often asked in interviews during this time. That is, if your front end wants to get the data under another domain name, how the front end needs to be requested and how the backend needs to be set.
There are two ways to
The $. getjson method of jquery supports cross-origin.
Page request:
$. Getjson (URL + '? Callback =? ', {Operate: 'add'}, function (RES ){}});
It is actually another encapsulation of $. Ajax.
$. Ajax ({type: 'get', URL: URL, data :{},
Principle: first, create a server to process the paging page. You must determine whether the total number of returned data records or the data of a page are determined based on the action parameter.
Getcommentdata. ashx:
using system; using
Recently, when jquery is used for asynchronous requests, the request is successful, but the correct JSON result cannot be returned. Call the error function with the object returned by jquery. getjson () and obtain "parsererror" with the alert error
The official struts tutorial provides the following example: struts 2 + spring 2 + JPA + Ajax. The source address is:
Http://struts.apache.org/2.3.1.1/docs/struts-2-spring-2-jpa-ajax.html
After downloading the example, manually import the package
ASPX page:
Displayafter = "1">
Loading the page ....
Aspx. CS page:
Private void JS ()
{
Int L = 100000000;
Int K = 0;
For (INT I = 0; I {
K ++;
}
This. textbox1.text = K. tostring ();
}
Protected void button#click (Object sender,
Reprinted from: http://www.cnblogs.com/beyondGodLike/archive/2009/08/04/1538543.html
The Ajax. Updater method has three parameters: Ajax. Updater (container, URL, options)
1. Control ID, 2. requested URL, and 3. Optional ):
The first small example of learning Ajax
We often use JavaScript to dynamically change the content in the DIV, especially when using Ajax.
As the saying goes, it is easy to say that it is easy to do. It seems easy to compile on programming. Although
The helloworld of Ajax will be written, and I will enter the door. Let's take a look. This time I am going to write a tab switch effect. It used to be the first time the page was loaded, so I will read all the frames, then, an event is triggered to
Ajax is called Asynchronous JavaScript and XML (Asynchronous JavaScript and XML). It is a Web page development technology used to create interactive web applications. It uses: XHTML + CSS to represent information; JavaScript to operate the Document
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.