Get the App
SLTechnology News&Howtos  ›  Development  › 

How Ajax reads data

Shulou Source: shulou.com Published: 2022-06-03 07:16:27 11月15日 Update

This article is about how Ajax reads data. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Take out what we prepared last time. 1: function of XMLHTTPRequest object. 2: Asp outputs a file in xml format. You can click to view the contents of the file: Asp outputs data in xml format.

After opening it, you will find that we use Asp technology to dynamically output a xml format data. if you don't know about this technology, please go back and read: ajax begins to prepare an article with a msg tag in this output data. the tag contains a piece of text. today we read this msg tag. and display the text content on your web page.

Take a look at the following code first. and attach a demonstration of the effect

Web_ajax.asp

The copy code is as follows:

A simple example of Asp outputting xml, which we will use to read data in our ajax tutorial example later.

Html

Css

Dom

JavaScript

Ajax

Here is the content of the static page

The copy code is as follows:

Create an available xmlhttpreuqest object

Tags: Data function representative content state code object label variable attribute method output file text format browser reference browse success element Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Tech Info Redmi Linux vpn