Introduction to asp.net Ajax Programming technology (1/3)

Source: Internet
Author: User
Tags object model

1. What is AJAX

(1) AJAX:"Asynchronous JavaScript and XML" in Chinese means: asynchronous JavaScript and XML, A web development technology that creates interactive Web applications. Ajax is not an acronym, but a noun created by Jesse James Guiett .

(2) not a single technology, but an organic use of a range of related technologies:Web Standards (standards-based presention) +xhtml+ the representation of CSS.

1 use Dom (Document Object Model) for dynamic display and interaction.

2 use XML and XSLT for data interaction and related operations.

3) using XMLHttpRequest for asynchronous data query, retrieval.

(3) simple to understand as:javascript+xmlhttprequest+css+ server-side collection.

2. Normal Web page request Receipt Process ( Request response Mode )

3. Ajax WEB Application Model

4. Ajax Benefits

(1) The essence of AJAX is a browser-side tip.

(2) The main purpose of Ajax technology is to locally exchange data between client and server.

(3) The main character of this technology is XMLHttpRequest , which is the ability to update the data without having to reload the entire page, which is called the refresh without Reload ( light Refresh ).

(4) communication with the server is achieved entirely through JavaScript .

(5) The amount of data transmitted using XMLHttpRequest itself is very small, so the reaction will be very fast, that is, make the network program more like a desktop application.

(6) Ajax is the use of JavaScript in the background secretly to help you go to the server for information, and finally have JavaScript or Dom to help you render the result, because all actions are made by JavaScript to do so, so that the inconvenience of Web page overload, users can not feel the pain of waiting.

5. XMLHttpRequest

(1) the center of the Ajax application is it.

(2) The XMLHttpRequest object is created differently in ie and non ie browsers.

(3) in short, it can read txt or XML data asynchronously from the server side .

(4) The creation method in ie and non ie is:

To create an asynchronous object based on the way a response is used by different browsers

The code is as follows Copy Code

function Createxmlhttp () {

Xhobj = false;

try {

Xhobj = new ActiveXObject ("Msxml2.xmlhttp"); iemsxml3.0+

catch (e) {

try {

Xhobj = new ActiveXObject ("Microsoft.XMLHTTP"); iemsxml2.6

} catch (E2) {

Xhobj = false;

}

}

if (!xhobj && typeof xmlhttprequest!= ' undefined ') {//Firefox, Opera 8.0+, Safari, Google browser

Xhobj = new XMLHttpRequest ();

}

return xhobj;

}

Home 1 2 3 last
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.