Home  >  Article  >  Backend Development  >  Data paging display in XML data island

Data paging display in XML data island

黄舟
黄舟Original
2017-04-01 13:28:451574browse

We already know how to use HTML to display the data in the XML data island in Table form, but if there is a lot of data, we hope to pagingdisplay the data. To prevent users from scrolling up and down the screen.

Friends who are familiar with HTML know that there is a dataPageSize attribute in the 9efd419b5d4562ad7fb2ce42f3a1ba7c tag, which can specify the number of records displayed on each page. We only need to set the dataPageSize specifies a positive integer to achieve paging purposes, such as c2280a220ebe1129f26a17d3536ddf20 means that 20 pieces of data are displayed on each page.

Some people may ask "Is data paging that simple?" Yes, it is that simple, but the paging function is not powerful at this time, because I have not yet implemented the page When it comes to jumps, users can’t always be in a daze looking at the data on the first page.

9efd419b5d4562ad7fb2ce42f3a1ba7c tag also provides a series of methods that allow us to realize the page turning function. Such as FirstPage(), previousPage(), nextPage(), lastPage(). We add four buttons to the HTML and add the code for the click event:

<inputtype="button"onclick="tblbooks.firstPage();"value="FirstPage">

<inputtype="button"onclick="tblbooks.previousPage();"value="PreviousPage">

<inputtype="button"onclick="tblbooks.nextPage();"value="NextPage">

<inputtype="button"onclick="tblbooks.lastPage();"value="LastPage">

The above is the detailed content of Data paging display in XML data island. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn