Before this we need to do a simple AJAX preparation, but you have to have the basic html,javascript,dom writing ability. Otherwise this Ajax tutorial will be hard for you to read. My goal is to pass this tutorial. Allows you to use AJAX technology
Request method, divided into get and post:
Get
The most common HTTP request, the normal Internet browsing page is get. The parameter request for Get mode is directly followed by the URL and begins with a question mark. (JS used
That is, in the Trigger Area dropdown box onchange event, the agent's dropdown box options are also corresponding changes, such as the choice of the area of Hunan-〉 Changsha, then the agent dropdown box only shows the agents of Changsha.
Originally
When a request is sent, the client cannot determine when it will complete the request, so the event mechanism needs to be used to capture the requested State XMLHttpRequest object that provides the onReadyStateChange event implementation. This is
Copy Code code as follows:
-------------------WebService1-----------------------------
To allow the use of ASP.net AJAX to invoke this Web service from a script, uncomment the downlink.
[System.Web.Script.Services.ScriptService]
public
Copy Code code as follows:
-----------------------------htmlpage1.htm---------------------------------
First page Prev next page Last page Id= "Txtpageindex" type= "text"/>Go
-------------------------WebService1---
Scrolling down to the bottom of the page load data is a lot of waterfall streaming site practice, that to see how to achieve with JSONP, side dishes summary record, the master do not spray.
Of course, this example uses the jquery library, the
Page Script:
Copy Code code as follows:
function Ajaxsave (URLS) {
Defines a variable for storing XMLHttpRequest objects
var xmlhttp;
Defines a variable for storing the response returned from the server
var responsecontext = "
1. This code is appropriate for all Drop-down list values
2. Only one common method is required for all Drop-down lists of a project;
Step One: Create an entity bean;
Copy Code code as follows:
public class Dictionarybean {
Id of
Copy Code code as follows:
Using the ScriptManager in Ajax extensitons
Use places like
Put code
onclick= "Ibtnfbsj_click"/>
Call UpdateProgress When you refresh the page statically but this backstage also
IE7 and the following request method with Get, the URL limit is a very easy to ignore the problem (maximum 2,083 characters). So if the URL is likely to be too long, be sure to use post.
---------------------------------------------------------------
OK, or as before, build a login.html page, to fill in the login information, and then build a dealdata.aspx page (of course, here with the general processing is the best: *.ashx), used for processing data.
In the login.html page, the code is as
Before doing project, use a table control, its data is loaded asynchronously, I am in this table binding the data of the function below friends do some business processing, run the page, the browser in my write business processing that place hit the
Obviously Ajax is a technique for accessing data using JavaScript scripts.
AJAX enables the Web page to implement asynchronous updates. This is the local updating of the Web page without reloading the entire page.
XMLHttpRequest is the key to AJAX
Step one: Import the jquery plugin
Copy Code code as follows:
Step Two: Add information to the show where
Copy Code code as follows:
Step three: Add the JS code to the page
Copy Code code as
Check a lot of processing log, say is in web.config inside add what statement, is following these:
Copy Code code as follows:
Found my web.config all have Ah! Oh, damn it! You copied me, I
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