答案:[复制此代码]CODE:
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 currentpage<1 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)*maxperpage<totalput 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=> <td width="355" class="blueback2"><div align="center">信息标题</div></td>
<td width="84" class="blueback2"><div align="center">更新日期</div></td>
<td width="40" class="blueback2"><div align="center">点击</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=> </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=> 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=yname&mname
%>
<td bgcolor="#D6DFF7"><div align="center"><a href=> <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=> <td bgcolor="#D6DFF7"><div align="center"><a href=> <td bgcolor="#D6DFF7"><div align="center"><a href=> </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=> <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>
<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('确定要删除选择的信息吗')){document.formselect.submit();return true;}return false;}">
<input type="submit" name="dxydo" value="生成">
<input type="submit" name="dxydo" value="移动">
</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%>条,
当前页<%=currentpage%>/<%=n%>
<%if currentpage<2 then%>
[首页] [上一页]
<%else%>
<a href=> <%end if%><% if n-currentpage<1 then%>
[下一页] [尾页]<%else%><a href=> <%end if%>
转到:<select name="dd" class="sle"
onChange="location.href=> <%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上一个:asp:生成静态页面函数
下一个:简单分页函数一 常用
- 更多asp疑问解答:
- asp正则过滤重复字符串的代码
- 用asp过滤全部html但保留br类似的符号
- 会asp,但感觉asp要过点,想学php。但我一般做的都是小公司的站,用access数
- PHP的空间可以用ASP的源代码吗?
- 以前做asp程序,现在应该怎样发展?是学.net还是php
- 以前做asp程序,现在应该怎样发展?是学.net还是php
- 想做一个市级的人才网acess,sql数据库,语言asp,jsp,php分别用哪种好
- jsp,asp,php 区别
- 我想找一个有比较多漏洞的网站的源码,比如可以asp,php注入等都可以。供学习研究用。请提供下载地址。。
- 现在候找人做个网站,用ASP,还是PHP语言去做好
- asp,php ,jsp,.net 对于做网站前台的重要吗?
- asp和php的区别是什么?
- 我是新手SEO菜鸟 请问wp dw php asp cms myspl dede 这些软件应该如何区分呀?
- 网页制作相关的三种语言:ASP JSP PHP那个好点,简单点?
- 网页制作相关的三种语言:ASP JSP PHP那个好点,简单点?