關(guān)鍵字: html
book.xml
<?xml version="1.0" encoding="GB2312" standalone="yes"?>
<書籍列表>
<計(jì)算機(jī)書籍>
<書名>Spring2.0寶典</書名>
<作者>李剛</作者>
<價(jià)格>79.00</價(jià)格>
<簡要介紹>
該書詳細(xì)介紹了Spring2.0的用法
</簡要介紹>
</計(jì)算機(jī)書籍>
<計(jì)算機(jī)書籍>
<書名>輕量級J2EE企業(yè)開發(fā)實(shí)戰(zhàn)</書名>
<作者>李剛</作者>
<價(jià)格>63.00</價(jià)格>
<簡要介紹>
該書主要介紹了一種流行的輕量級企業(yè)應(yīng)用架構(gòu)
</簡要介紹>
</計(jì)算機(jī)書籍>
<計(jì)算機(jī)書籍>
<書名>Ajax寶典</書名>
<作者>李剛</作者>
<價(jià)格>76.00</價(jià)格>
<簡要介紹>
該書全面介紹了Ajax的相關(guān)技術(shù)
</簡要介紹>
</計(jì)算機(jī)書籍>
</書籍列表>
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>價(jià)格</th>
<th>簡要介紹</th>
</thead>
<tr align="left">
<td><span datafld="書名"></span></td>
<td><span datafld="作者"></span></td>
<td><span datafld="價(jià)格"></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>