Javascript+xml implementation of pagination instances

Source: Internet
Author: User
javascript|xml| Paging

<xml id= "Users" >
<userGroup>
<user id= "1" >
<userid>user 1</userid>
<name>name 1</name>
</user>
<user id= "2" >
<userid>user 2</userid>
<name>name 2</name>
</user>
<user id= "3" >
<userid>user 3</userid>
<name>name 3</name>
</user>
<user id= "4" >
<userid>user 4</userid>
<name>name 4</name>
</user>
<user id= "5" >
<userid>user 5</userid>
<name>name 5</name>
</user>
<user id= "6" >
<userid>user 6</userid>
<name>name 7</name>
</user>
<user id= "7" >
<userid>user 7</userid>
<name>name 7</name>
</user>
<user id= "8" >
<userid>user 8</userid>
<name>name 8</name>
</user>
<user id= "9" >
<userid>user 9</userid>
<name>name 9</name>
</user>
</userGroup>
</xml>
<table id= "DataTable" datasrc= "#users" datapagesize= "3" width= "" border= "1" >
<thead>
<th> Data userid</th>
<th> Data name</th>
<th> Properties Id</th>
</thead>
<tr>
<td><span datafld= "userid" ></span></td>
<td><span datafld= "Name" ></span></td>
<td><span datafld= "id" ></span></td>
</tr>
</table>
<button >previous page</button>
<button >next page</button>

Copy it directly into. htm

If your XML is external, refer to XML, such as

<xml id= "Users" src= "User.xml" >
</xml>

If you want to add a hyperlink in the (TD) text, use the

<a datafld= "Useid" ><span datafld= "name" ></sapn></a>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.