JQuery + PHP + ajax enables Weibo to load more content lists. On some weibo websites, we often see such an application. the Weibo content list does not use pagination entries. Instead, a certain number of records are loaded at a time and displayed on the list page, when users often see such applications 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 function.
Basic principles of Ajax loading: 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 "view more" link at the bottom of the list page,This link is triggered to send an Ajax request to the server. the backend PHP program obtains the request parameters and responds to the request. it obtains the corresponding database records and returns them to the front-end page in JSON format, on the front-end page, jQuery parses JSON data 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.