| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 478 人关注过本帖
标题:谁能帮我改改这个分页代码
只看楼主 加入收藏
szzbingfeng
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2007-11-30
收藏
 问题点数:0 回复次数:0 
谁能帮我改改这个分页代码
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
 id=Trim(Request.QueryString("id"))
  %>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" c>
<title>职业认证。。中国教育资讯..欢迎你!!</title>
<link href="css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>
</head>
<body>
<!--#include file="top.asp"-->
<table width="753" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr bgcolor="#F7FFF7">
    <td colspan="3"><img src="images/where.gif" width="16" height="16"> <font color="#006600">当前位置:计算机技术网
      <a href="default.asp">首页</a> >> 教育资讯</font></td>
  </tr>
  <tr>
    <td width="218" valign="top">
      <table width="210" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="210"><img src="images/122.jpg" width="155" height="16"></td>
        </tr>
        <tr>
          <td valign="top">
<table width="92%" height="81" border="1" cellpadding="0" cellspacing="0" bordercolor="#009900"
bordercolorlight="" bordercolordark="ffffff">
              <tr>
                <td height="79" valign="top">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <%
      
       sql="select * from zrzx order by txt desc"
  rs.open sql,conobject,1,1
  while not rs.eof and b<15
  b=b+1
        %>
        <tr>
                      <td width="9%" height="21" valign="top"> <div align="center"><img src="images/456.jpg" width="4" height="17"></div></td>
                      <td width="91%"> <div align="left"><a href=zrzx_list.asp?id=<%=rs("id")%>><%=mid(rs("title"),1,10) %></a></div></td>
                    </tr>
     <% rs.movenext
     wend
     rs.close %>
                    <tr>
                      <td> </td>
                      <td> </td>
                    </tr>
                  </table>
                  
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
      <p align="center"><a href="[url=http://www.]http://www.[/url]" target="_blank"><img src="images/l1.gif" width="120" height="35" border="0"></a>
      </p>
      <p align="center"> </p>
      <p align="center"><a href="[url=http://www.]http://www.[/url]" target="_blank"><img src="images/l2.gif" width="111" height="35" border="0"></a></p></td>
    <td width="1" background="images/5.jpg"> </td>
    <td width="534" valign="top"> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td colspan="4"><div align="center">
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="2%"> </td>
                  <td width="98%"><img src="images/123.jpg" width="259" height="18" ></td>
                </tr>
              </table>
            </div></td>
        </tr>
          <%
 pp=30
 
  sql="select * from  zrzx where txt="&id
  rs.open sql,conobject,1,1
  if not rs.eof then
  count=rs.recordcount
    if count=empty then
      count=0
    end if
    if count/pp>(count\pp) then
        totalpage=(count\pp)+1
  else
   totalpage=(count\pp)
    end if
end if
 pagecount=cint(request.querystring("topage"))                              
 if pagecount<=0 then pagecount=1
 if pagecount>totalpage then pagecount=totalpage
 
 if not rs.eof then
  rs.movefirst
 rs.move (pagecount-1)*pp
 i=0
 while not rs.eof and i<pp/2
 i=I+1
  %>
        <tr>
          <td width="6%" height="19" valign="middle"> <div align="center"><img src="images/ico2.jpg" width="4" height="6"></div></td>
          <td width="47%" valign="bottom"><a href="zrzx_list.asp?id=<%=rs("id")%>"><%= rs("title") %></a><font color="#999999">  </font></td>
          <%
    if  not rs.eof then
     rs.movenext
     if not rs.eof then
     
   %>
          <td width="2%" valign="middle"><img src="images/ico2.jpg" width="4" height="6"></td>
          <td width="45%" valign="bottom"><a href="zrzx_list.asp?id=<%=rs("id")%>"><%= rs("title") %></a><font color="#999999">  </font></td>
        </tr>
   
        <tr bgcolor="#F7F7F7">
          <td height="1" colspan="4"> </td>
        </tr>
  
        <%
   end if
  if  not rs.eof  then
  rs.movenext
  end if
    end if
  wend
  %>
        <tr>
          <td height="16" colspan="4"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr bgcolor="#F5F5F5">
                <td width="58%" height="18"><div align="center">一共有留言:<font color="#FF0000"><%= count %></font> 条 一共分:<%= totalpage %> 页 当前为第: <%= pagecount %> 页</div></td>
                <td width="42%">
                  <%
   if totalpage>1 then
      if totalpage-pagecount>0 then
   %>
                  <a href="jrzx.asp?topage=<%=pagecount+1%>">下一页</a>
                  <%
   
   end if
   if pagecount<>1 and totalpage-pagecount>0 then
    response.write "<font color=#FFFFFF>/</font>"
    end if
   
    if pagecount<>"1" then %>
                  <a href="jrzx.asp?topage=<%=pagecount-1%>">上一页</a> 
                  <%
   end if
   end if
   end if%>
                  
                  </td>
              </tr>
              <tr>
                <td height="21"> </td>
                <td><form name="form1" method="post" action="">
                    快速转到:
                    <select name="menu1" >
        <%
       for s=1 to totalpage
        bb=""
        if pagecount=s then bb="selected"
       %>
                        <option value="jrzx.asp?topage=<%=s%>" <%= bb %>>第<%= s %>页</option>
       <%
       next
       %>
                    </select>
                  </form></td>
              </tr>
            </table></td>
        </tr>
      </table>
      <p> </p>
    </td>
  </tr>
</table>
<!--#include file="head.asp"-->
</body>
</html>
搜索更多相关主题的帖子: 改改 代码 
2007-11-30 15:57
快速回复:谁能帮我改改这个分页代码
数据加载中...
 
   



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

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