This article will explain in detail how to use jquery. more. js to load data under the page after clicking more. It is very practical. If you need it, you can refer to it. We can use this application on Some Weibo websites. The Weibo content list does not use pagination entries, but loads a certain number of records at a time and displays them on the list page, when you browse to the bottom of the list page, you can click "view more" to load more records. This article uses jQuery and PHP to show you how to implement this application.
Basic principle: When a page is loaded, jQuery requests data from the background. PHP queries the database to display the latest records on the list page, there is a "more" link at the bottom of the list page. By triggering this link, an Ajax request is sent to the server. the backend PHP program obtains the Request Parameters and makes the corresponding response, obtain the database records and return them to the front-end page in JSON format. jQuery parses JSON data on the front-end page and appends the data to the List page. It is actually the Ajax paging effect.
First, introduce the jquery library and jquery. more. js plug-in. jquery. more. js has encapsulated many functions and provided the parameter configuration function.