Ajax is a Web development technology that creates interactive Web applications and is a collection of asynchronous JavaScript and XML. At its core is the XMLHttpRequest object, which enables local updating of Web pages without submitting the entire page to the server, and is a key technology in the architecture of AJAX Web applications.
Basic properties:
Basic methods:
XMLHttpRequest Five step:
First: Create XMLHttpRequest objects
Second: Registering the callback function
Third: Setting parameters for server interaction
Four: Set the data sent to the server side, initiate and server-side interaction
V: Determine if the server-side interaction is complete, and whether the server side returns the correct data
HTML code:
Code in ASPX:
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Web;
Using System.Web.UI;
Using System.Web.UI.WebControls;
namespace XMLHttpRequest Five step
{public
partial class XMLHttpRequest:System.Web.UI.Page
{
protected void Page_Load (object sender, EventArgs e)
{
//response.clear ();
Gets the current value, the get commits using
the Request.QueryString method//string username = request.querystring["username"];
Post submission, using Request.Form
string username = request.form["username"];
Response.Write ("Name:"
+ username + "' <br/> Time: '" + DateTime.Now.ToString () + "");
Response.End ();}}
Summarize:
XMLHttpRequest is a core part of Ajax and needs to be understood well. At the beginning of contact, some do not understand what is going on, and the video is also the original Ajax, on the surface seems not very good understanding, but through the specific demo practice, it will be found in fact this quite easy to understand.
The above is the entire content of this article, I hope to help you learn.