test.html
————————————————————————————————————————————————————
<HTML>
<HEAD>
<SCRIPT for="window" event="onload">
var xmldoc=xmldso.XMLDocument;
xmldoc.load("conference5.xml");
</SCRIPT>
</HEAD>
<BODY>
<H1 align="center">分页显示XML元素</H1>
<HR size="5" width="80%">
<OBJECT width="0" height="0"
classid="clsid:550dda30-0541-11d2-9ca9-0060b0ec3d39"
id="xmldso">
</OBJECT>
<CENTER>
<TABLE id="table" datasrc="#xmldso" border="1" datapagesize="2" cellspacing="3" >
<THEAD>
<TH>主题:</TH>
<TH>日期:</TH>
<TH>时间:</TH>
<TH>城市:</TH>
<TH>地点:</TH>
</THEAD>
<TR align="center" style="color:blue">
<TD><DIV datafld="title"></DIV></TD>
<TD><DIV datafld="date"></DIV></TD>
<TD><DIV datafld="time"></DIV></TD>
<TD><DIV datafld="city"></DIV></TD>
<TD><DIV datafld="location"></DIV></TD>
</TR>
</TABLE>
<HR>
<P>
<INPUT type="button" value="下一页" οnclick="table.nextPage()">
<INPUT type="button" value="前一页" οnclick="table.previousPage()">
<INPUT type="button" value="第一页" οnclick="table.firstPage()">
<INPUT type="button" value="最后一页" οnclick="table.lastPage()">
</CENTER>
</BODY>
</HTML>
conference5.xml
____________________________________________________________________
<?xml version="1.0" encoding="GB2312" ?>
<conferences>
<conference>
<title>XML 新技术</title>
<date>2/18/2001</date>
<time>9:00</time>
<city>台北市</city>
<location>丽晶饭店</location>
</conference>
<conference>
<title>XML 新技术</title>
<date>2/25/2001</date>
<time>9:00</time>
<city>新竹市</city>
<location>白云饭店</location>
</conference>
<conference>
<title>XML 应用在网页设计</title>
<date>3/18/2001</date>
<time>9:00</time>
<city>台中市</city>
<location>长荣桂冠酒店</location>
</conference>
<conference>
<title>XML应用在网页设计</title>
<date>3/25/2001</date>
<time>9:00</time>
<city>台南市</city>
<location>远东饭店</location>
</conference>
<conference>
<title>XML 应用在电子商务</title>
<date>4/10/2001</date>
<time>9:00</time>
<city>高雄市</city>
<location>五福饭店</location>
</conference>
</conferences>
xml的分页程序
最新推荐文章于 2024-09-28 21:04:55 发布