This article mainly introduces jQuery + PHP + ajax for loading more content lists on Weibo, which is very practical for Weibo development, for more information, see some weibo websites. we often see such applications. pagination entries are not used in the weibo content list, instead, a certain number of records are loaded at a time and displayed 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.