Home > Article > Web Front-end > How to implement website pagination_html/css_WEB-ITnose
I am new to HTML5 and can already write pages (hard-written content). If I want to implement the functions of previous page and next page like a normal blog, do I need to associate it with the database or use some method? Is it possible?
Ajax or anything else can be implemented, you just need the total number of items, the number of items displayed on each page, and the starting line. Several parameters, so you query the database twice, once to check the actual number of items, and once to check the total number of items.
The front-end can use the jquery pagination plug-in. The server-side depends on what database and language program are used, and there are corresponding paging methods.
The general approach is to request data asynchronously and pass each The number of entries displayed on the page and the current page. Then the corresponding number of entries is read from the database, returned using json data format, and then processed in the foreground.
The front-end can use the jquery pagination plug-in. The server side depends on what database and language program are used, and there are corresponding paging methods.
The general approach is to request data asynchronously, pass the number of entries displayed on each page in the past and the current page, then read the corresponding number of entries from the database, return it using json data format, and then Front desk processing.
Ajax or anything else can be implemented. You just need the total number of items, the number of items displayed on each page, and the starting row. So you query the database twice and query the actual items once. Count, check the total number of items at one time.
In fact, the conditions are just a few parameters. It does not have to be connected to the database. The set array can also be paged. The key is how you process it, that is, what language you use to process it.