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="400" border="1">
<thead>
<th>数据 userid</th>
<th>数据 name</th>
<th>属性 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 onclick="document.all.datatable.previousPage()">Previous Page</button>
<button onclick="document.all.datatable.nextPage()">Next Page</button>
直接复制成.htm就行
如果你的xml在外部,则要引用xml,如
<xml id="users" src="user.xml">
</xml>
如果你要添加超链接在(td)文本中,则使用
<a datafld="useid" onmouseover="if(this.changged == null) { this.href ='###.aspx?'+this.href; this.changed=true}"><span datafld="name"></sapn></a>