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

Introduction of commonly used dynamic loading techniques ajax and js

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This article mainly explains the "commonly used dynamic loading technology ajax and js introduction", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in-depth, together to study and learn "commonly used dynamic loading technology ajax and js introduction" it!

For static web pages, we only need to visit the corresponding URL to get all the data, while dynamic web pages are not so simple. For example, the following websites

Http://q.10jqka.com.cn/zjhhy/detail/code/M/

Open it in the browser and we can see the corresponding table data.

In the browser, you can view the contents of different pages through the page flip button.

However, you will find that the url of the page does not change during the page flipping, which indicates that the data in this table is loaded dynamically. At present, there are two commonly used dynamic loading techniques

1. Ajax

2. Js

The corresponding data is obtained by building an ajax or js request. For these dynamically loaded data, we can not only request the url of the web page, but need to find the links of the above two requests. Some simple dynamic loading links can be quickly found through the browser's debugging tools.

1. Ajax

The ajax request is found through the xhr request in the network option. If you turn the page on the above website, you can see the ajax request link shown below.

Directly use the crawler or ajax link, you can return the corresponding data.

2. Js dynamic loading

The js request is found through the js request in the network option. In the following websites, the paged data is dynamically loaded through the js request.

Https://finance.sina.com.cn/stock/reportch/jinqilin.shtml

An example of a js request is as follows

By analyzing the url rule of the request, we can help us to obtain the corresponding data connection in batch. For simple ajax and js requests, you can quickly get data through browser debugging tools.

Thank you for your reading, the above is the content of "introduction of commonly used dynamic loading technology ajax and js". After the study of this article, I believe you have a deeper understanding of the introduction of commonly used dynamic loading technology ajax and js, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Internet Technology

Wechat

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

12
Report