Detailed explanation of AJAX XMLHttpRequest object

亚连
Release: 2018-05-24 10:40:10
Original
1617 people have browsed it

This article mainly introduces the AJAX XMLHttpRequest object in detail, which has certain reference value. Interested friends can refer to it

AJAX is a web development technology for creating interactive web applications. , is a collection of asynchronous Javascript and XML. Its core is the XMLHttpRequest object, which can partially update web pages without submitting the entire page to the server. It is a key technology in the AJAX Web application architecture.
Basic attributes:

Basic method:

##XMLHttpRequest five-step method:

First: Create an XMLHttpRequest object
Second: Register the callback function
Third: Set the parameters for interaction with the server
Fourth: Set the data sent to the server and start the interaction with the server
Fifth: Judgment Whether the interaction with the server is completed, and whether the server returns correct data
HTML code:

      

Copy after login

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五步法 { public partial class XMLHttpRequest : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //Response.Clear(); //获取当前值,get提交使用Request.QueryString方法 //string username = Request.QueryString["username"]; //POST提交,使用Request.Form string username = Request.Form["username"]; Response.Write("姓名:'" + username + "'
时间:'" + DateTime.Now.ToString() + "'"); Response.End(); } } }
Copy after login

The above is what I compiled for everyone. I hope it will be helpful to everyone in the future.

Related articles:

Ajax Gets data through city name

Ajax form verification after MVC meets bootstrap

AJAX request queue implementation

The above is the detailed content of Detailed explanation of AJAX XMLHttpRequest object. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!