Name: Age: Sex: Build a layer that accepts return information:
Note : compared to the Get method, the Post method transmits data larger than 2K, and the application in Ajax differs in that: "The Post method's request address and the
The core of Ajax technology is JavaScript, and JavaScript uses UTF-8 encoding, so when the page uses GBK or other encoding, without encoding conversion, there will be the problem of garbled Chinese. Here are the different test results and garbled
Five Steps for AJAX applications
1. Create a XMLHttpRequest Objectvar xmlhttp=createxmlhttprequest ();function Createxmlhttprequest (){var xmlHttp;if (window.xmlhttprequest){IE6 above version and other browsers built-in XMLHttpRequest objectsXmlhttp=
saw the cascading menu of the Big Gorge, I also swim a fish, hey, hei, took a little time to get a cascading menu paste up to see. In this case, the member name is automatically displayed as soon as you select the member category name: first
Error Tip:No ' Access-control-allow-origin ' header is present on the requested resource.
cause of the errorJavaScript is in security consideration and is not allowed to be accessed across domains.
Solutions 1. Install pip install
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
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 (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 () method parameters in detail: url: Requires that the requested address be sent as a parameter of type string, (default is the current page address). Type: A parameter of type string is required, and the request method (post or get) defaults
Preface
1.JSON and JSONP2.jqXHR object one. JSON and JSONP
If the $.ajax () method is in the same domain, the JSON file can be loaded as long as the DataType property is set. In the non-identical domain, JSONP can be used, but it is also
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
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,
Check whether the user name has been registered.
Dom version. This Code only supports ie browsers
User name:
Jquery version. This code is compatible with most browsers.
User name:
Server handler: checkusername. ashx
using
The common Ajax program is HTML + ashx, which requires a lot of communication code. However, Microsoft's WCF integrates communication code and simplifies the code.
1. Create a New WCF Server Page, and create a method and data class for the
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 parameters passed in the request's Ajax path (data) will be received by a variable with the same name (with the set get method) in the action. The returned data is a jquery array object, the data variables involved in the called action will be
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