标题:分页出了问题,不知道怎么回事?
取消只看楼主
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
结帖率:85.71%
已结贴  问题点数:15 回复次数:5 
分页出了问题,不知道怎么回事?
<!--#include file="conn.asp"-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="images/css.css" type=text/css rel=stylesheet>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>编辑课程信息</title>
</head>

<body  vLink=#000000 bgColor=#cad7f7>
<table width="655" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
  <tr>
    <td width="655" height="30">
            <table width="654" border="0" cellspacing="0" cellpadding="0">
                       <tr>
                  <td height="17" colspan="2">&nbsp;</td>
                       </tr>
         
                       <tr>
                         <td width="82" height="30">&nbsp;                         </td>
                         <td width="572">&nbsp;</td>
                       </tr>
    </table></td>
  </tr>
  <tr>
    <td height="30"><table width="653" border="0" cellpadding="0" cellspacing="0">
      
      <tr>
        <td width="60" height="32">
          <div align="center">学号 </div>
          </td>
        <td width="65" height="32"><div align="center">姓名</div></td>
        <td width="46" height="32"><div align="center">年龄</div></td>
        <td width="41" height="32"><div align="center">性别</div></td>
        <td width="80" height="32"><div align="center">进校时间</div></td>
        <td width="94" height="32"><div align="center">籍贯</div></td>
        <td width="159"><div align="center">专业</div></td>
      </tr>
      <%         
                  set rs=server.CreateObject("ADODB.Recordset")
                  rs.open "select  student_number,student_name,age,sex,in_time,homeplace,major from Student",conn ,1,3
               
                  if rs.eof and  rs.bof  then
                        response.Write"目前没有学生信息"
                  else              
                  counts=10
                  rs.pagesize=counts
                  allpages=rs.pageCount
                  page=request("page")
                  if not isNumeric(page)  then  page=1
                  if  isEmpty(page)  or   Cint(page)<1  then
                            page=1
                  else if  Cint(page)>=allPages  then
                            page=allPages
                  end  if
                  rs.AbsolutePage=page
                  Do  while(Not rs.eof)  and  counts>0
         %>                    
              
      
      <tr>
        <td height="25"><%=rs("student_number")%></td>
        <td width="65" height="25"><%=rs("student_name")%></td>
        <td><%=rs("age")%></td>
        <td><%=rs("sex")%></td>
        <td><%=rs("in_time")%></td>
        <td><%=rs("homeplace")%></td>
        <td><%=rs("major")%></td>
        </tr>
      <%
            counts=counts-1
            rs.movenext
             if  rs.eof  then exit  do
               loop
               end if
             %>
    </table></td>
  </tr>
</table>
  <table width="653" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
  <tr>
    <td height="30" align="center">      
    <%
         response.Write"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;当前共有"&rs.recordcount&"条用户记录"
      if  page=1 then  
         response.Write"<font color=darkgray>&nbsp;&nbsp;首页  前页</font>"
      else
         response.Write"<a href=pagesview.asp?page=1>首页</a>  <a href=pagesview.asp?page="&page-1&">&nbsp;&nbsp;前页</a>"
     end  if
     if page=allPages  then
          response.Write"<font color=darkgray>下页&nbsp;&nbsp; 末页</font>"            
     else        
          response.Write"<a href=pagesview.asp?page="&page+1&">下页</a> <a href=pagesview.asp?page="&allPages&">末页</a>"
     end if
          response.Write" 第"&page&"页 共"&allPages&"页 "        
          end if
    %>
   
    </td>
  </tr>
</table>

</body>
</html>
页面不显示学生信息,只显示工业多少条信息,不知道是什么地方出错了,就是个分页结构.谢谢
搜索更多相关主题的帖子: html head content include PUBLIC 
2010-05-17 16:19
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
得分:0 

显示就是这样子的
2010-05-17 16:21
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
得分:0 
回复 3楼 魏兴耀
看起来还是有点晕
2010-05-17 16:55
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
得分:0 
有没有人在帮忙看看,谢谢了
2010-05-17 17:45
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
得分:0 
回复 3楼 魏兴耀
不过还是很感谢你,谢谢
2010-05-17 17:58
fengmnll
Rank: 1
等 级:新手上路
帖 子:79
专家分:3
注 册:2008-11-6
得分:0 
回复 6楼 fengmnll
好的,谢谢
2010-05-20 10:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-307031-1-1.html




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

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