XML创建可排序、分页的数据显示页面(9) </td> </xsl:for-each> </tr> <xsl:for-each select="./*[position() < 6 and position() > 0]"> <xsl:sort select="./*[1]" order="ascending"/> <tr bgcolor="#FFCCFF"> <xsl:for-each select="./*"> <td> <xsl:value-of select="."/></td> </xsl:for-each> </tr> </xsl:for-each> </Table> </xsl:template> </xsl:stylesheet> 以下是进行输出的Exam.htm文件: <HTML> <Head> <META http=equiv="Content-Type" Content="text/html;charset=gb2312"> <STYLE> body { font-family:宋体; font-size:9pt;} th { font-family:宋体; font-size:11pt; font-weight:bold;} </STYLE> <Script language="vbscript"> Option Explicit Dim intRecordsPerPage ''每个页面显示的记录数 intRecordsPerPage = 6 ''每个页面显示的记录数,默认设定为6 '' 更新显示页面的函数 Function window_onload() '' 显示设定的记录数 Style.XMLDocument.selectNodes("//xsl:for-each/@select")(1).Value = "./*[position() < " & intRecordsPerPage + 1 & " and position() > 0]"