When $. Ajax () is used, I set the timeout time to 3 seconds:
CopyCodeThe Code is as follows: $. Ajax ({
URL: "ajaxtable1.aspx ",
Cache: false,
Error: function (XMLHttpRequest, textstatus, errorthrown ){
//
},
Success: function (HTML ){
//
}
CopyCodeThe Code is as follows: // Ajax Test
VaR XMLHTTP;
Function createxmlhttprequest (){
If (window. activexobject ){
XMLHTTP = new activexobject ("Microsoft. XMLHTTP ");
}
Else if (window. XMLHttpRequest ){
XMLHTTP = new XMLHttpRequest ();
Let's take a look at this example. This has always been what I want to do.First, the following figure is displayed:Use northwind data. Click the plus sign to display the detailed orders of other products, and the number of orders for each product is
CopyCode The Code is as follows :/**
* pagination. js
* General Ajax-based paging class
* @ Author jeanwendy
* @ Version 1.0
*/
VaR paginationindex = 0;
VaR pagination = function (trtemplatid ){
$ (). Ajaxstart (function (){
$. Blockui ({
Message:
First, let's list the implementation of Ajax in jquery and prototype.
Jquery:
CopyCode The Code is as follows:
Prototype:Copy codeThe Code is as follows:
the prototype cannot be refreshed after the setinterval function is introduced. Why?
Client
Code :
Copy code The Code is as follows:
untitled document
Year:
select
1996-2006
1986-1995
1971-1985
1970 or earlier
Subdirectory:
select
server code: copy Code the code is as follows:
header
OK. paste a few images first.
The general process is that the user clicks the logon link in the upper-right corner of the page and then the DIV simulation window pops up. This window calls the login. ASPX page through IFRAME, and the user
Find by checking the source code
Copy codeThe Code is as follows: // Create the request object; Microsoft failed to properly
// Implement the XMLHttpRequest in IE7, so we use the ActiveXObject when it is available
// This function can be overriden
Start with a New Year's page. It is currently called grade.htm.
This file requires the introduction of two files: jquery. js (jquery framework file) and grade. js (verified individual files ).
The following input is used to enter the username. id = "
At the beginning, I learned JQuqery, and many $ get (),... and so on have already fainted me. Give up now.Later, I learned about ASP. net ajax. Under the leadership of Microsoft, I gradually switched from the server to the client programming.
After testing AJAX, it seems more concise than prototype. In JQuery, AJAX has three implementation methods: $. ajax (), $. post, $. get ().
XHTML (main ):
input name:
input age:
input Gender:
input job:
submit
POST
Traditional ajax Code
Copy codeThe Code is as follows:
JQuery MethodCodeCopy codeThe Code is as follows:
Get and postCodeCopy codeThe Code is as follows: get vs. POST enter name and birthday
Control ajaxCodeCopy codeThe Code is as follows: $.
As follows:
Request. jsp
Copy codeThe Code is as follows: PageEncoding = "ISO-8859-1" %>
Insert title here
City Code: City Name:
Response. jspCopy codeThe Code is as follows: PageEncoding = "UTF-8" %>String code = request. getParameter
Use the jquery framework: Download jquery. js
Create a web project ajax;
Create a jslib folder under webRoot: specifically store js files;
Create an html/jsp page under webRoot:
Login.html
Copy codeThe Code is as follows:
user verification
Core ajax (options) functions include setting up xmlhttprequest, extracting data, and determining whether the response is successful. These functions basically meet daily requirements.
Copy codeThe Code is as follows: // A generic function for
In the B/S Development era, the front-end layout of web pages also absorbed the layout of Tab pages. In particular, the combination of Ajax technology can give full play to the advantages of the good performance of Tab pages and data cache. It is a
ASP. net ajax Framework
1. ValidatorCalloutIt is a member of ASP. net ajax Control Toolkit. The old bottled new wine provides a nice pop-up prompt effect for the validation Control of ASP. NET through extension. The disadvantage is that the
Improper handling may affect user experience and cause inexplicable problems.
The following solutions are provided based on your own ideas and online reference. Each solution has different advantages and disadvantages. Welcome
Let's make corrections.
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