Data paging display in XML data island

黄舟
Release: 2017-04-01 13:28:45
Original
1561 people have browsed it

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

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
width="100% "> 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.

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">
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!