Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What can ajax do?

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "what can ajax do". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn what ajax can do.

AJAX is a technology used to create fast dynamic web pages, which can be used to: 1, make local requests to achieve local refresh (update the page without refreshing the page); 2, request data from the server after the page is loaded; 3, receive data from the server after the page is loaded; 4, send data to the server in the background.

The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.

What is Ajax?

AJAX = Asynchronous JavaScript and XML.

AJAX is a technology for creating fast dynamic web pages.

AJAX makes web pages update asynchronously by exchanging a small amount of data with the server in the background. This means that some parts of the page can be updated without reloading the entire page.

Traditional web pages (without AJAX) if you need to update the content, you must reload the entire page.

There are many cases of applications using AJAX: Google Maps, Gmail, Youtube, and Facebook.

Used for asynchronous data transfer (HTTP request) between browser and server to achieve local request for local refresh

What does Ajax do? What's the use?

1. Update the web page without refreshing the page (partial refresh)

2. Request data from the server after the page is loaded

3. Receive data from the server after the page is loaded

4. Send data to the server in the background

How to use Ajax?

1. Create a XMLHttpRequest object

2. Use the open method to set the interactive information with the server

3. Set requestHeader () request.setRequestHeader (attribute name, attribute value)

4. Send () sets the data sent and starts to interact with the server

5. Get a response and register the event

Example:

Document

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report