The main point of Jax is the XMLHTTPRequest object. Different browsers use different methods to create XMLHttpRequest objects. Use the IE browserActivexobjectWhile other browsers useXMLHttpRequestJavascript built-in objects.
Javascript is a dynamic language. Currently it is mainly used as a browser control language around the world. It can be used to manipulate page elements to achieve advanced browser client effects.
Jquery is a javascript class library. It is
Prototype was used for projects some time ago. JS later found some complicated situations, sometimes with memory overflow, and simply needed it. To ensure program compatibility, it implemented a simple Ajax encapsulation based on the prototype
The difference between calling WebService using jquery Ajax and calling WebService using pure JS Ajax is that
The former can run normally on IE, chrome, and Firefox, while the latter can only run normally on IE, and the former has pure cross-origin
Get: multiple requests return the same result. You can use get to obtain data from the server;
Post: the status on the server needs to be changed.
When using post, you need to set the Content-Type header of the XMLHTTPRequest object, as shown
Now, more and more Ajax applications are used. The company found some materials on the Internet so that they can be used in the future, however, I have not found any examples in development. Now I have posted a simple example for your reference. I
One of the ways to submit a form using Ajax is to convert the form data into a string of request strings. Below is
Convert form data into a string of request strings
Function formtorequeststring (form_obj){VaR QUERY_STRING = '';VaR and = '';//
Finally, it's a good time.
An example of Ajax partial Refresh:
Front-end page:
Ajax partial refresh
Background page: [getpart. asp]
Dim rs
Dim SQL
Set rs = server. Createobject ("ADODB. recordset ")
SQL = "select * From king_test"
// Ajax application
// My God, I cannot understand PHP. Forget it. Find an example of Asp.net.
/*
Use jquery to generate a div container with the ID "rating ".
The Code generates five links and appends them to the "rating" container. When one of
When jquery Ajax is used to send a download request to the background, the background output is sent to the browser, but the file download box is not prompted. I don't know why.
You can use jquery to create a form and submit it for file download.
Today I have nothing to worry about. in C #2.0, I used ajax to write an example of refreshing and fast paging. The time is too short. For the shortcomings, please point out that we should first put ajaxpro. DLL file to reference, you can go to http:/
Use a custom client verification method to implement Ajax asynchronous data submission.
The client verification control of. NET is used in this section. After verification, data is submitted through Ajax.
Code:
Method 1: action username = java.net. urldecoder. decode (username, "UTF-8"); Method 2: the page is gb2312 encoded. action does not need to be transcoded.
At the moment of programming, we always need to use some of the latest technologies to solve problems .... The following is an example that I use Ajax and jequery together. Hope to help friends who study together.
Front-end code:
User
Ajax request and browser cache
In modern Web website construction, front-end code is filled with a large number of Ajax requests. If Ajax requests can be cached in a browser, network requests can be significantly reduced and the program response
In the. NET Framework, a file type is generally used to process files (. ashx ). It can be used as a server in Ajax development. In particular, when a request stays on a page, the following example is used to implement cascading update in the HTML
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