CopyCodeThe Code is as follows: $. Ajax (
{
Type: "Post ",
URL: "/membercomment. aspx/getordertobecommentcount ",
Success: function (result ){
// Todo:
}
)
No error is reported in JS during use. This is my most depressing thing. I don't know
If Ajax is not used, a JS segment is run in CS.
Code The method can be:
Page. clientscript. registerstartupscript (page. GetType (), "", " ");
If Ajax is used on the page, the above Code is ineffective even if executed. To cope with this situation,
CopyCodeThe Code is as follows: var result = Unescape (XMLHTTP. responsetext );
VaR J = eval ("(" + Result + ")");
VaR J = eval (result );
JSON (JavaScript Object Notation) is a simple data format, which is lighter than XML. JSON is a javascript
Therefore, a Boolean value passed by Ajax is returned during submission. In fact, the get2 () function passed by Ajax is a subfunction of chkfull (BT) and cannot be passed to external functions. Alert () does not work either. Therefore, the "Submit"
1. Ajax rain
Ajaxrain has many examples that perfectly integrate Ajax, CSS, DHTML, or Javascript. Some demos are really worth looking at, even if you are not a web design (Development) engineer.
2. Ajax daddy
Ajax daddy collects a
I. ajaxsample. aspx
Process business data and generate XML data for jqueryrequest. aspx to call,CodeAs follows:Copy codeThe Code is as follows: protected void page_load (Object sender, eventargs E){String uid = request. querystring ["username"]
CopyCode The Code is as follows:
click me!
Background method:Copy codeThe Code is as follows: [system. Web. Services. webmethod ()]Public static string AA (string Str){Return STR;}
Technologies included in Ajax
We all know that AJAX is not a new technology, but a combination of several original technologies. It is composed of the following technologies.
1. CSS and XHTML are used for representation.
2. Use the DOM model for
Once you download and install the Dae (dynatrace Ajax edition), you must go toProgramGroup, and find dynatrace. Obviously, the first thing to do is to enter a URL link. Next, click the play icon and select "new run configuration" to enter a new URL.
After a request is sent, the client cannot determine when the request will be completed. Therefore, an event mechanism is required to capture the request State. The XMLHTTPRequest object provides the onreadystatechange event to implement this
I. What is Ajax? Ajax is called "Asynchronous JavaScript and XML" (Asynchronous JavaScript and XML). Ajax is not a technology. It is actually several technologies, each of which has its own unique characteristics, combined into a powerful new
Including Post, get, Ajax
Frontend call CopyCodeThe Code is as follows: jquery. Post ("newdoajax. aspx", {max: 'n! ', Name: 'wsenmin'}, function (data) {alert (data )});Jquery. Get ("newdoajax. aspx", {max: 'B! ', Name: 'wsenmin'}, function
There are more and more Ajax applications. Most of the Ajax processing is to display a "loading..." on the front-end, and then submit the data to the server for processing. After the processing is completed, the "processing completed" is displayed ".
Let's take a look at a simple piece of JavaScript code returned by jquery Ajax.
Code
Copy code The Code is as follows: function getreturnajax {
$. Ajax ({
Type: "Post ",
Http://www.jb51.net/userexist.aspx ",
Data: "username =" + vusername.
Problem: a bug in the jquery Control
When $. Ajax is used, an error occurs only in IE7. IE6 and IE8 are normal. The error message is as follows:
Description on the official forum:
Symptoms:
1) In Firefox, the processing page is encoded as gb2312, and data submission is correct;
2) In IE8, the processing page is encoded as gb2312, and garbled characters occur when submitting Chinese data.
Whether it is $. post or $. ajax,
Request methods, including GET and POST:
GET
The most common HTTP request is GET. The GET request directly follows the URL and starts with a question mark. (Window. location. search is used in JS ). The parameters can be encoded using
That is, when the onchange event in the regional drop-down box is triggered, the options of the agent drop-down box are changed accordingly. For example, if you select Hunan> Changsha, the agent drop-down box only displays the agent in Changsha.
I
Copy codeThe Code is as follows:
new document
(set by default) display position: disappear time in the upper left corner: do not disappear Onclick = "feedBackMessage ('message prompt Test 1... '); return false"Href = "#">
This is to reduce the unnecessary burden caused by frequent access to the server, but it also brings some problems that the special business logic cannot meet.
For example:
You need to use a select drop-down list at the front end as the ajax trigger
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.