ASP带跳转输入框的分页

<table width="100%" height="50" border="0" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
              <tr>
                <td valign="top" bgcolor="#F7F7F7"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                    <%
              dim actionName
              select case action
            case "del":
             actionName = "删除"
             call del()
            end select
             %>
                    <%
             Dim rsList,sqlList
          Dim pageno '当前页数
          Dim pmcount '每页显示条数
          Dim mpage '总页数
          Set rsList = Server.createobject("Adodb.RecordSet")
          pageno = request.querystring("pageno")
          pmcount = 3
          sqlList = "select * from T_ArticleReview where F_ArticleID = "&ArticleID&" order by F_ID desc"
          rsList.open sqlList,conn,1,1
          if rsList.eof then
           response.write "<br><p  align='center'><font color=red><B> 对不起,暂无评论!</B></font></p>"
          else
           rsList.pagesize = pmcount
           mpage = rsList.pagecount
           if pageno="" then pageno=1
           if cint(pageno)<1 or cint(pageno)>mpage then pageno=1
           rsList.absolutepage = pageno
           
           Dim rc
           Dim re
           rc = rsList.pagesize
           re=1
           do while not rsList.eof and rc>0
           %>
                    <tr>
                      <td height="4">&nbsp;</td>
                    </tr>
                    <tr>
                      <td><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#E8E8E8">
                          <tr>
                            <td bgcolor="#FFFFFF"><form id="form1" method="post">
                                <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                                  <tr>
                                    <td height="5" colspan="3"><img name="" src="" width="1" height="5" alt=""></td>
                                  </tr>
                                  <tr bgcolor="#F4FEDE">
                                    <td><span class="txt_hei12"> &nbsp;<%= rsList("F_UserName") %> : <%=year(rsList("F_Addtime"))%>年<%=month(rsList("F_Addtime"))%>月<%=day(rsList("F_Addtime"))%>日</span></td>
                                    <td align="right"><%
              if Session("curUserGrade") <> "" then
             %>
                                      <table>
                                        <tr>
                                          <td width="10%" class="ziti14"><span class="txt_hei12"><a title="请确定是否删除,删除后不能恢复!" href="javascript:jDelete('?id=<%=rsList("F_ArticleID")%>&delID=<%=rsList("F_ID")%>&title=<%=title%>&bid=<%=rsList("BigCategoryID")%>&sid=<%=rsList("SmallCategoryID") %>')">删除</a></span></td>
                                        </tr>
                                      </table>
                                      <% end if%>
                                    </td>
                                  </tr>
                                  <tr>
                                    <td colspan="3" background="img/xian.gif"><img name="" src="img/xian.gif" width="4" height="1" alt=""></td>
                                  </tr>
                                  <tr>
                                    <td height="30" colspan="3"><span class="xiti">&nbsp;<%=rsList("F_Content")%></span></td>
                                  </tr>
                                  <tr>
                                    <td height="15" colspan="3">&nbsp;</td>
                                  </tr>
                                </table>
                              </form></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td>&nbsp;</td>
                    </tr>
                    <%
            rsList.movenext
            re=re+1
            rc=rc-1
           loop
          end if
           %>
                  </table></td>
              </tr>
              <tr>
             
              <td height="30" valign="middle" bgcolor="#EEEEEE">
             
              <table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
                <tr>
               
                <td>
               
                <table align="left">
                  <tr>
                    <td class="xiti">共
                      <SCRIPT language=javascript src="/template/include/reviewCount.asp?id=<%=ArticleID%>"></SCRIPT>
                      条评论 当前第 <%=pageno%> 页/共 <%=mpage%> 页</td>
                  </tr>
                </table>
                <table width="30%" border="0" align="right" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>&nbsp;</td>
                    <%
              if pageno="" then pageno=1
            if pageno>1 then
             %>
                    <td width="40" class="xiti"><a href="news_comment.asp?id=<%=ArticleID%>&title=<%=title%>&bid=<%=bid%>&sid=<%=sid%>&pageno=<%=pageno-1%>">上一页</a></td>
                    <% else %>
                    <td width="40" class="xiti">上一页</td>
                    <%
            end if
            if int(pageno) < int(rsList.pagecount) then
             %>
                    <td class="xiti"><a href="news_comment.asp?id=<%=ArticleID%>&title=<%=title%>&bid=<%=bid%>&sid=<%=sid%>&pageno=<%=pageno+1%>">下一页</a></td>
                    <% else %>
                    <td class="xiti">下一页</td>
                    <% end if %>
                    <td>
                    <form id="pageForm" method="get" action="">
                      <div align="center"><span class="xiti">跳转到
                        <INPUT name="pageNo" id="p" size="4" value="<%=pageno%>">
                        页</span></div>
                      </td>
                      <td width="18" align="right"><div align="right">
                          <input type="image" src="/template/images/go.gif" onClick="document.pageForm.submit" width="18" height="18">
                        </div>
                        <input name="id" type="hidden" value="<%=ArticleID%>">
                        <input name="title" type="hidden" value="<%=title%>">
                        <input name="bid" type="hidden" value="<%=bid%>">
                        <input name="sid" type="hidden" value="<%=sid%>">
                    </form>
                  </td>
                 
                  </tr>
                 
                </table>
                </td>
               
                </tr>
               
              </table>
              </td>
             
              </tr>
             
            </table> 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值