關鍵字: html
book.xml
<?xml version="1.0" encoding="GB2312" standalone="yes"?>
<書籍列表>
<計算機書籍>
<書名>Spring2.0寶典</書名>
<作者>李剛</作者>
<價格>79.00</價格>
<簡要介紹>
該書詳細介紹了Spring2.0的用法
</簡要介紹>
</計算機書籍>
<計算機書籍>
<書名>輕量級J2EE企業開發實戰</書名>
<作者>李剛</作者>
<價格>63.00</價格>
<簡要介紹>
該書主要介紹了一種流行的輕量級企業應用架構
</簡要介紹>
</計算機書籍>
<計算機書籍>
<書名>Ajax寶典</書名>
<作者>李剛</作者>
<價格>76.00</價格>
<簡要介紹>
該書全面介紹了Ajax的相關技術
</簡要介紹>
</計算機書籍>
</書籍列表>
display.html
Html代碼
<html>
<body>
<xml src="book.xml" id="xmldso" async="false"></xml>
<table id="tb2" datasrc="#xmldso" width="100%" border="1" datapagesize="2" >
<thead>
<th>書名</th>
<th>作者</th>
<th>價格</th>
<th>簡要介紹</th>
</thead>
<tr align="left">
<td><span datafld="書名"></span></td>
<td><span datafld="作者"></span></td>
<td><span datafld="價格"></span></td>
<td><span datafld="簡要介紹"></span></td>
</tr></table>
<INPUT TYPE="button" VALUE="第一頁" ONCLICK='document.getElementById("tb2").firstPage();'>
<INPUT TYPE="button" VALUE="前一頁" ONCLICK='document.getElementById("tb2").previousPage();'>
<INPUT TYPE="button" VALUE="后一頁" ONCLICK='document.getElementById("tb2").nextPage();'>
<INPUT TYPE="button" VALUE="最后一頁" ONCLICK='document.getElementById("tb2").lastPage();'>
</body>
</html>