Detailed description of AJAX XMLHttpRequest object, ajaxxmlhttprequest

Source: Internet
Author: User

Detailed description of AJAX XMLHttpRequest object, ajaxxmlhttprequest

AJAX is a web development technology used to create interactive web applications. It is a collection of Asynchronous Javascript and XML. Its core is the XMLHttpRequest object, which enables partial update of webpages without submitting the entire page to the server. It is a key technology in AJAX Web application architecture.
Basic attributes:

Basic method:

XMLHttpRequest five-step method:
1. Create an XMLHttpRequest object
Second, register the callback function.
Third: set parameters for interaction with the server
Fourth, set the data sent to the server to start interaction with the server.
Fifth, determine whether the interaction with the server is complete, and determine whether the server returns correct data.
HTML code:

<! DOCTYPE html> 

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 (); // get the current value. Use get to submit 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 ();}}}

Summary:

XMLHttpRequest is the core part of AJAX and needs to be well understood. Some of them didn't understand what was going on at the beginning, and the video was about native AJAX. On the surface, they didn't seem very easy to understand, but through specific demo practices, it is easy to understand.

The above is all the content of this article, hoping to help you learn.

Articles you may be interested in:
  • How to process XMLHttpRequest objects that send multiple requests simultaneously in AJAX
  • Ajax basics-XMLHttpRequest object Summary
  • Description of the status value of Ajax xmlHttpRequest
  • AJax learning note 1 (XMLHTTPRequest object)
  • Jquery ajax learning notes 2 use the responseXML of the XMLHttpRequest object
  • In php, XMLHttpRequest (Ajax) cannot set a custom Referer solution.
  • Ajax communication principle XMLHttpRequest
  • How to Use ajax to create an XMLHttpRequest object
  • AJAX (XMLHttpRequest. status) status Code
  • Resolve the compatibility problem between creating the ajax core XMLHTTPRequest object and the browser

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.