打印本文 打印本文  关闭窗口 关闭窗口
仅用xsl和asp实现分页功能
作者:采集员 文章来源:来源于网络 点击数: 更新时间:2005/9/10 13:29:47
;</xsl:attribute>&#91; &#62;&#62;&#62; &#93; </a>
        <a><xsl:attribute name="href">search_jieguo.asp?id=<xsl:value-of select="$size"/></xsl:attribute>
&#91; 尾 &#93;</a>
        </xsl:otherwise>
        </xsl:choose>
        <!-- ---------------------------------------- -->
                    </td>
                    </tr>
                </table><br/>
            <!-- ---------遍历符合要求的PO结点------------- -->
            <xsl:for-each select="PO[position()&lt;=$pid and position()&gt;($pid - $size)]">
                <xsl:sort select="PO_ID" order="descending" data-type="number"/>
                <xsl:call-template name="PO"/>
                <br/><br/><br/>
            </xsl:for-each>
<!-- 退出一级choose的一个when条件分支!!!!! -->
</xsl:when>
<!-- ------------------用户直接进入的状态------------------ -->
<xsl:otherwise>
<!-- 进入一级choose的另一个when条件分支!!!!! -->
<table border="0" cellpadding="2" cellspacing="0" width="630">
<tr><td align="right">
<a>&#91; 首 &#93;</a>
<a title="前一页">&#91; &#60;&#60;&#60; &#93; </a>
<a title="后一页"><xsl:attribute name="href">search_jieguo.asp?id=<xsl:value-of select="$pid -
$size"/></xsl:attribute>&#91; &#62;&#62;&#62; &#93; </a>
<a><xsl:attribute name="href">search_jieguo.asp?id=<xsl:value-of select="$size"/></xsl:attribute>
&#91; 尾 &#93;</a>
</td></tr>
</table><br/>
            <xsl:for-each select="PO[position()&lt;=$pid and position()&gt;($pid - $size)]">
                <xsl:sort select="PO_ID" order="descending" data-type="number"/>
                <xsl:call-template name="PO"/>
                <br/><br/><br/>
            </xsl:for-each>
<!-- 退出一级choose的另一个when条件分支!!!!! -->
</xsl:otherwise>
</xsl:choose>
        <!-- --------------翻页链接到此结束----------- -->
        <br/>
        <xsl:if test="count(//PO)=0">

    <div align="center"><b>
      <img src="images/msg2.gif" align="absmiddle"/>&#127;
      </b><font color="#CC0000" face="楷体CS" size="3"><b>
      没有符合当前条件的订单</b></font>
      <a><xsl:attribute name="href">lkxx.asp?po_id=<xsl:value-of select="PO_ID"/></xsl:attribute></a>
    </div>
><br/><br/>
<input type="button" value="重新输入条件查询" onclick="location.href='search.asp'"/>
        </xsl:if>
    </xsl:template>






<!-- ------------------------------------------>
<xsl:template name="PO">
  <table border="1" cellpadding="2" cellspacing="0" width="100%">
    <tr>
      <td nowrap="nowrap" width="70"> &#127;号码</td>
      <td nowrap="nowrap" width="110"> &#127;名称</td>
      <td nowrap="nowrap" width="110"> &#127;日期</td>
      <td nowrap="nowrap" width="110"> &#127;人员</td>
    </tr>
    <tr>
<td nowrap="nowrap"> &#127;<xsl:value-of select="num"/></td>
<td nowrap="nowrap"> &#127;<xsl:value-of select="username"/></td>
<td nowrap="nowrap"> &#127;<xsl:value-of select="dt"/></td>
<td nowrap="nowrap"> &#127;<xsl:value-of select="men"/></td>
    </tr>
  </table>
</xsl:template>
</xsl:stylesheet>

上一页  [1] [2] 



打印本文 打印本文  关闭窗口 关闭窗口