主頁 > 知識(shí)庫 > asp最常用的分頁函數(shù)

asp最常用的分頁函數(shù)

熱門標(biāo)簽:客服外呼系統(tǒng)呼叫中心 電話機(jī)器人案例 vue 地圖標(biāo)注拖拽 自動(dòng)外呼系統(tǒng)怎么防止封卡 電話機(jī)器人銷售公司嗎 成都銷售外呼系統(tǒng)公司 保定電銷機(jī)器人軟件 土地證宗地圖標(biāo)注符號 鎮(zhèn)江云外呼系統(tǒng)怎么樣
復(fù)制代碼 代碼如下:

    rs.open sql,conn,1,1
    if rs.eof and rs.bof then
     response.write "p align='center'>還沒找到文章/p>"
  else
   totalPut=rs.recordcount
   maxperpage=18
   if currentpage1 then
    currentpage=1
    end if
   if (currentpage-1)*maxperpage>totalput then
      if (totalput mod maxperpage)=0 then
      currentpage=totalput\maxperpage
      else
      currentpage=totalput\maxperpage+1
      end if
   end if
    if currentpage=1 then
    showpage1 totalput,maxperpage,"infotype.asp?id="request("id")
    showcontent()
    showpage totalput,maxperpage,"infotype.asp?id="request("id")
    else
       if (currentpage-1)*maxperpagetotalput then
       rs.move (currentpage-1)*maxperpage
       dim bookmark
       bookmark=rs.bookmark
       showpage1 totalput,maxperpage,"infotype.asp?id="request("id")
       showcontent
       showpage totalput,maxperpage,"infotype.asp?id="request("id")
       else
       currentpage=1
       showpage1 totalput,maxperpage,"infotype.asp?id="request("id")
       showcontent
       showpage totalput,maxperpage,"infotype.asp?id="request("id")
       end if
    end if 
end if
%>
%
  sub showcontent()
  %>
  tr>
    td height="20" class="blueback2">div align="center">ID/div>/td>
    td class="blueback2">div align="center">a href="javascript:selectall()">font color="#FFFFFF">選擇/font>/a>/div>/td>
    td width="355" class="blueback2">div align="center">信息標(biāo)題/div>/td>
    td width="84" class="blueback2">div align="center">更新日期/div>/td>
    td width="40" class="blueback2">div align="center">點(diǎn)擊/div>/td>
    td width="55" class="blueback2">div align="center">添加人/div>/td>
    td width="44" class="blueback2">div align="center">編輯/div>/td>
    td width="43" class="blueback2">div align="center">刪除/div>/td>
    td width="62" class="blueback2">div align="center">生成[a href="javascript:void(null)" onClick="window.open('cshengcheng.asp','','width=0,height=0')">font color="#FFFFFF">歸零/font>/a>]/div>/td>
  /tr>  
  %

  i=1
   do while not rs.eof
%>

  tr>
    td width="39" height="25" bgcolor="#D6DFF7">div align="center">%=rs("id")%>/div>/td>
    td width="34" bgcolor="#D6DFF7">div align="center">
           input type="checkbox" name="dxyid" value="%=rs("id")%>">
     /div>/td>
    td bgcolor="#D6DFF7">a href="Article_show.asp?id=%=rs("id")%>" target="_blank">[%=rs("type_id")%>]%thetitle1=rs("title")
    strcounts=truelen(thetitle1)
    response.write thetitle1
    %>/a>/td>
    %
    datetime=rs("datetime")
    yname=year(datetime)
mname=month(datetime)
if len(mname)2 then mname="0"mname
dname=month(datetime)
if len(dname)2 then dname="0"dname
foldername=ynamemname
    %>
    td bgcolor="#D6DFF7">div align="center">a href="%=htmlfolder%>%=foldername%>/%=rs("id")%>.htm" title="查看生成的靜態(tài)頁面" target="_blank">%=rs("datetime")%>/a>/div>/td>
    td bgcolor="#D6DFF7">div align="center">%=rs("hits")%>/div>/td>
    td bgcolor="#D6DFF7">div align="center">%=rs("author")%>/div>/td>
    td bgcolor="#D6DFF7">div align="center">a href="news_edit.asp?dxy_id=%=rs("id")%>">修改/a>/div>/td>
    td bgcolor="#D6DFF7">div align="center">a href="javascript:delxx(%=rs("id")%>)">刪除/a>/div>/td>
    td bgcolor="#D6DFF7">div align="center">a href="javascript:makehtml(%=rs("id")%>)">生成(a href="javascript:void(null)" onClick="window.open('cshengcheng.asp?id=%=rs("id")%>','','width=0,height=0')">%=rs("shengcheng")%>)/a>/div>/td>
  /tr>
  %
  i=i+1
   if i>maxperpage then exit do
  rs.movenext  
  loop
  %>
  tr>
    td height="20" class="blueback2">div align="center">ID/div>/td>
    td class="blueback2">div align="center">a href="javascript:selectall()">font color="#FFFFFF">選擇/font>/a>/div>/td>
    td class="blueback2">div align="center">信息標(biāo)題/div>/td>
    td class="blueback2">div align="center">更新日期/div>/td>
    td class="blueback2">div align="center">點(diǎn)擊/div>/td>
    td class="blueback2">div align="center">添加人/div>/td>
    td class="blueback2">div align="center">編輯/div>/td>
    td class="blueback2">div align="center">刪除/div>/td>
    td class="blueback2">div align="center">生成/div>/td>
  /tr>
  %
  end sub    
  %>

  tr>
    td height="20" colspan="9" bgcolor="#D6DFF7">label>
       input type="button" name="dxydo" value="全選" onClick="javascript:selectall()">
        input type="submit" name="dxydo" value="刪除" onClick="{if(confirm('確定要?jiǎng)h除選擇的信息嗎')){document.formselect.submit();return true;}return false;}">
         input type="submit" name="dxydo" value="生成">
         input type="submit" name="dxydo" value="移動(dòng)">
    /label>/td>
    /tr>
    %
    function showpage(totalnumber,maxperpage,filename)
    %>
  tr>
    td height="20" colspan="9" bgcolor="#D6DFF7">
    %
dim n
if totalnumber mod maxperpage=0 then
n=totalnumber\maxperpage
else
n=totalnumber\maxperpage+1
end if
%>
div align="center">共有%=totalnumber%>/%=maxperpage%>條,

當(dāng)前頁%=currentpage%>/%=n%>nbsp;
        %if currentpage2 then%>
        [首頁]nbsp;[上一頁]
        %else%>
        a href="%=filename%>">font color="red">[首頁]/font>/a>nbsp;a href="%=filename%>page=%=currentpage-1%>">font color="red">[上一頁]/font>/a>
        %end if%>% if n-currentpage1 then%>
        [下一頁]nbsp;[尾頁]%else%>a href="%=filename%>page=%=currentpage+1%>">font color="red">[下一頁]/font>/a>nbsp;a href="%=filename%>page=%=n%>">font color="red">[尾頁]/font>/a>
        %end if%>
        轉(zhuǎn)到:select name="dd" class="sle" 

onChange="location.href=this.options[this.selectedIndex].value">
     %for j=1 to n
     if currentpage=j then
     %>option value="%=filename%>page=%=j%>" selected>%=j%>/option>
     %
     else
     %>
     option value="%=filename%>page=%=j%>">%=j%>/option>
     %
     end if
     next
     %>
    /select>
    /div>    /td>
    /tr>
    %
    end function
    %>
    %
    function showpage1(totalnumber,maxperpage,filename)
    %>
  tr>
    td height="20" colspan="9" bgcolor="#D6DFF7">
    %
dim b
if totalnumber mod maxperpage=0 then
b=totalnumber\maxperpage
else
b=totalnumber\maxperpage+1
end if
%>
div align="center">共有%=totalnumber%>/%=maxperpage%>條,

當(dāng)前頁%=currentpage%>/%=b%>nbsp;
     %
     dxystart=currentpage-5
     if dxystart1 then dxystart=1
     dxyend=currentpage+5
     if dxyend>b then dxyend=b
     for dxy=dxystart to dxyend
     if dxy=currentpage then
     response.write "[a href="filename"page="dxy">""font color=red>"dxy"/font>""/a>]""nbsp;"
     else
     response.write "[a href="filename"page="dxy">"dxy"/font>""/a>]""nbsp;"
     end if
     next
     %> 
    /div>    /td>
    /tr>
    %
    end function
    %>
  /form>
/table>
%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

標(biāo)簽:臺(tái)灣 成都 公主嶺 懷化 重慶 麗江 天津 內(nèi)江

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《asp最常用的分頁函數(shù)》,本文關(guān)鍵詞  asp,最常,用的,分頁,函數(shù),;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《asp最常用的分頁函數(shù)》相關(guān)的同類信息!
  • 本頁收集關(guān)于asp最常用的分頁函數(shù)的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章