主页 > 知识库 > asp分页生成html的程序脚本代码

asp分页生成html的程序脚本代码

热门标签:福建外呼增值业务线路 伊春外呼业务系统 绵阳防封电销卡价格 中国办理电信400电话 调度系统外呼 电销机器人教育 宜宾语音外呼系统软件 电销机器人源码网盘下载 河北智能外呼系统软件
这是asp分页列表生成静态页面得asp小程序脚本
复制代码 代码如下:

!--#include file="conn.asp"--> 
html>head>TITLE>分页测试/TITLE>LINK href="inc/style.css" type=text/css rel=stylesheet>/head> 
%strHead=strHead"html>" 
strHead=strHead"head>" 
strHead=strHead"TITLE>分页测试/TITLE>" 
strHead=strHead"LINK href=""inc/style.css"" type=text/css rel=stylesheet>" 
strHead=strHead"/head>" 
%> 
%  
sql="select * from news" 
set rs=server.createObject("ADODB.Recordset") 
rs.open sql,conn,1,1 
%>% 
rs.pagesize=2 
totalpage=rs.pagecount 
rs.close 
set rs=nothing 

for j=1 to totalpage 
sql="select * from news" 
set rs=server.createObject("ADODB.Recordset") 
rs.open sql,conn,1,1 

whichpage=j  
rs.pagesize=2 
totalpage=rs.pagecount 
rs.absolutepage=whichpage 
howmanyrecs=0 
%>% 
str0="" 
str0=str0"/p>" 
str0=str0"table bgcolor=#cecfce align=center border=0 width=800 cellpadding=2 cellspacing=1>" 
%>%  
do while not rs.eof and howmanyrecsrs.pagesize 
%>% 
str0=str0"tr bgcolor=#f7f7f7>" 
str0=str0"td bgcolor=#f7f7f7 align=""center"">"rs(0)"/td>" 
str0=str0"td bgcolor=#f7f7f7 align=""center"">"rs(1)"/td>" 
str0=str0"td bgcolor=#f7f7f7 align=""center"">"rs(2)"/td>" 
str0=str0"td bgcolor=#f7f7f7 align=""center"">"rs(3)"/td>" 
str0=str0"/tr>" 
%>% 
rs.movenext 
howmanyrecs=howmanyrecs+1 
loop 
rs.close 
set rs=nothing 
%>%str0=str0"/table>" 
%>% 

'分页部分 
ref="" 

ref=ref"br>" 
ref=ref"table bgcolor=#cecfce align=center border=0 width=800 cellpadding=0 cellspacing=1> " 
ref=ref"tr bgcolor=#f7f7f7>" 
ref=ref"td> " 
ref=ref"b>Pages: "  j  " / "  totalpage "/b>" 
ref=ref"/td>" 
ref=ref"td> " 

ref=ref"a href=list_1.html"">"  "FONT face=Webdings>9/FONT>"  "/a> " 
if whichpage=1 then 
ref=ref"FONT face=Webdings>7/FONT>" 
else 
ref=ref"a href=list_"j-1".html"">"  "FONT face=Webdings>7/FONT>"  "/a> " 
end if 

for counter=1 to totalpage 
ref=ref"a href=list_"counter".html"">["  counter  "]/a>" 
ref=ref " " 
if counter mod 10 = 0 then 
ref=ref "br>" 
end if 
next 

if (whichpage>totalpage or whichpage=totalpage) then 
ref=ref"FONT face=Webdings>8/FONT>" 
else 
ref=ref"a href=list_"j+1".html"">"  "FONT face=Webdings>8/FONT>"  "/a> " 
end if 
ref=ref"a href=list_"totalpage".html"">"  "FONT face=Webdings>:/FONT>"  "/a> " 

Dim fso,f 
Dim strTitle,strContent,strOut 
'创建文件系统对象 
Set fso=Server.createObject("Scripting.FileSystemObject") 
Set f=fso.createTextFile(Server.MapPath("list_"j".html"),true) 

'写入网页内容 
f.WriteLine strHeadstr0ref 
f.close 
response.write "正在生成第"j"个页面!br>" 
%>% 
next%>
您可能感兴趣的文章:
  • IIS6 中"ASP 0201 错误 无效的默认脚本语言" 的解决方法
  • 使用ASP控制指定站点解析脚本语言函数
  • 用InstallShield打包ASP程序的脚本
  • 隐藏修改文件时间和文件属性的ASP脚本
  • ASP.NET调用javascript脚本的常见方法小结
  • 从一个网站扒下的asp生成静态页面的代码 脚本之家特供版
  • iis、apache与nginx禁止目录执行asp、php脚本的实现方法
  • ASP上传漏洞之利用CHR(0)绕过扩展名检测脚本
  • ASP中Server.Execute和Execute实现动态包含(include)脚本的区别
  • ASP.NET中后台注册js脚本使用的方法对比
  • ASP程序中常用的脚本语言

标签:优质小号 延边 铜川 苏州 电商邀评 新乡 那曲 河池

巨人网络通讯声明:本文标题《asp分页生成html的程序脚本代码》,本文关键词  asp,分页,生成,html,的,程序,;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 下面列出与本文章《asp分页生成html的程序脚本代码》相关的同类信息!
  • 本页收集关于asp分页生成html的程序脚本代码的相关信息资讯供网民参考!
  • 推荐文章