| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 598 人关注过本帖
标题:为什么分页页码出现负数?
只看楼主 加入收藏
qjw9004
Rank: 1
等 级:新手上路
帖 子:89
专家分:0
注 册:2011-1-27
结帖率:47.37%
收藏
已结贴  问题点数:50 回复次数:1 
为什么分页页码出现负数?
<!-- #include file="conn.asp" -->
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<%
 set rs3=conn.execute("select * from fkmx")                                                                                                                                                
 rs3.open sql,conn,1,1  
 rs3.pagesize=10                                                                                                                                                                                                                        
 if request("page")<>"" then                                                                                                                                                                                                            
   epage=cint(request("page"))                                                                                                                                                                                                           
    if epage<1 then epage=1                                                                                                                                                                                                              
    if epage>rs3.pagecount then epage=rs3.pagecount                                                                                                                                                                                      
 else                                                                                                                                                                                                                                    
 epage=1                                                                                                                                                                                                                                 
 end if                                                                                                                                                                                                                                 
 rs3.absolutepage=epage                                                                                                                                                                                                                  
 %>                                                                                                                                                                                                                                      

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<table border="0" width="90%" table frame="below" cellpadding="0" style="border-collapse: collapse; border: 1px dotted #A4A4FF" cellspacing="0">                                                                                       
      <!--DWLayoutTable-->                                                                                                                                                                                                               
       <tr>                                                                                                                                                                                                                              
         <td height="19" colspan="4"align="left" type="text" >付款明细</td>                                                                                                                                                              
         <td height="19" colspan="9"align="right" type="text" ></td>                                                                                                                                                                     
       <tr>                                                                                                                                                                                                                              
         <td width="40" height="28"align="center" type="text" >序号</td>                                                                                                                                                                 
         <td width="7" align="center"  type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                                   
         <td width="81" align="center"  type="text">付款日期</td>                                                                                                                                                                        
         <td width="8" align="center"  type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                                   
         <td width="80" align="center"  type="text">凭证编号</td>                                                                                                                                                                        
         <td width="8" align="center"  type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                                   
         <td width="78" align="center"  type="text">对应科目</td>                                                                                                                                                                        
         <td width="7" align="center"  type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                                   
         <td width="95" align="center"  type="text">付款金额</td>                                                                                                                                                                        
         <td width="8" align="center"  type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                                   
         <td width="104" align="center"  type="text">尚欠金额</td>                                                                                                                                                                       
         <td width="10" align="center"  type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                                  
         <td width="143" align="center"  type="text">发票情况</td>                                                                                                                                                                       
       </tr>                                                                                                                                                                                                                             
 <%                                                                                                                                                                                                                                      
 for i=0 to rs3.pagesize                                                                                                                                                                                                      
 if rs3.bof or rs3.eof then exit for                                                                                                                                                                                                     
 %>                                                                                                                                                                                                                                      
       <tr>                                                                                                                                                                                                                              
         <td height="28"align="center" valign="bottom" type="text" ><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                 
         <td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                               
         <td align="left" valign="bottom" type="text" ><%=rs3("fkrq")%></td>                                                                                                                                                           
         <td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                               
         <td align="center" valign="bottom" type="text"><%=rs3("pzbh")%></td>                                                                                                                                                            
         <td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                               
         <td align="left" valign="bottom" type="text"><%=rs3("dykm")%></td>                                                                                                                                                            
         <td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                               
         <td align="right" valign="bottom" type="text"><%=formatnumber(rs3("fkje"),2,-1,0,-1)%></td>                                                                                                                                                            
         <td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                               
         <td align="right" valign="bottom" type="text"><%=formatnumber(rs3("sqje"),2,-1,0,-1)%></td>                                                                                                                                                            
         <td align="right" valign="bottom" type="text"><!--DWLayoutEmptyCell-->&nbsp;</td>                                                                                                                                               
         <td align="left" valign="bottom" type="text"><%=rs3("fpqk")%></td>                                                                                                                                                            
       </tr>                                                                                                                                                                                                                             
 <%                                                                                                                                                                                                                                      
 rs3.movenext()                                                                                                                                                                                                                          
 next                                                                                                                                                                                                                                    
 %>                                                                                                                                                                                                                                      
       <tr>                                                                                                                                                                                                                              
         <td height="25" colspan="13"align="center" valign="bottom" type="text" >                                                                                                                                                        
 <p align="center">                                                                                                                                                                                                                     
 <a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>">首页</a>&nbsp;                                                                                                                                                                                                      
 <a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&page=<%=epage-1%>">前一页</a>&nbsp;                                                                                                        
 <a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&page=<%=epage+1%>">后一页</a>&nbsp;                                                                                                        
 <a href="1.asp?htbh=<%=request.querystring("htbh")%>&gys=<%=request.querystring("gys")%>&page=<%=rs.pagecount%>">末页</a>                                                                                                                                                                                    
 </p>                                                                                                                                                                                                                                    
 <p align="center">现在是第<%=epage%>页&nbsp;&nbsp;&nbsp;共<%=rs.pagecount%>页</p>                                                                                                                                                                     
 </td>                                                                                                                                                                                                                                   
</tr>                                                                                                                                                                                                                           
</table>
</body>
</html>
搜索更多相关主题的帖子: include PUBLIC file 
2011-08-08 11:09
towering
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:1
帖 子:261
专家分:507
注 册:2007-10-9
收藏
得分:35 
用UTF-8编码试试

我的ASP小站:http://www./
2011-08-11 19:03
快速回复:为什么分页页码出现负数?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.024631 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved