using Ali Fastjson below is Pom.xml
com.alibaba
fastjson
1.2.9
Ajax return String
JS foreground ajax note introduces jquery files such as jquery.min.js function Testajax () {//text value var
YesterdayProgramThe value assignment is invalid during Ajax post. si_id has a value in the callback function of post, but it cannot be obtained outside the post function?
VaR si_id $. Post ("/sysbrand/check_name/", {Name: name, type: Type},
I. Load () method (simplest)
Load (URL, [data], [callback])
URL: the address of the loaded page.
Data: Optional. data sent to the server. The format is key/value.
Callback: optional, callback function
1. The simplest application
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 = '';//
Front-end
No title page
click
receive background data
Background
Using system;
Using system. Data;
Using system. configuration;
Using system. collections;
Using system. Web;
Using system. Web. Security;
Using
Static Page
No title page
enter name and birthday
Dynamic page
Protected void page_load (Object sender, eventargs E)
{
// Response. Write ("background data ");
If (request. httpmethod = "Post ")
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:/
Ajax application scenarios
1. Form-driven Interaction
For traditional form submission, after entering the content in the text box, click the button. After the background processing is complete, the page is refreshed, and then check whether the
If you do not use any help package, you may write a large amount of code to create an XMLHTTPRequest object and asynchronously track its process, then parse the response and process it. You are very lucky when you do not need to support more than
var xmlhttpreq; // create the XMLHTTPRequest object function createxmlhttprequest () {If (window. XMLHttpRequest) {// Mozilla xmlhttpreq = new XMLHttpRequest ();} else if (window. activexobject) {// IE browser try {xmlhttpreq = new activexobject
1. Resource websites
1. Chinese website
1) Ajax China (recommended)
A professional Ajax technology website with clear categories, a large number of electronic tutorials, and Ajax source code downloads!
Http://www.okajax.com
2)
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