最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

asp分頁(yè)生成html的程序腳本代碼

 更新時(shí)間:2007年09月22日 22:19:37   作者:  
這是asp分頁(yè)列表生成靜態(tài)頁(yè)面得asp小程序腳本
復(fù)制代碼 代碼如下:

<!--#include file="conn.asp"--> 
<html><head><TITLE>分頁(yè)測(cè)試</TITLE><LINK href="inc/style.css" type=text/css rel=stylesheet></head> 
<%strHead=strHead&"<html>" 
strHead=strHead&"<head>" 
strHead=strHead&"<TITLE>分頁(yè)測(cè)試</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 howmanyrecs<rs.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>" 
%><% 

'分頁(yè)部分 
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 
'創(chuàng)建文件系統(tǒng)對(duì)象 
Set fso=Server.createObject("Scripting.FileSystemObject") 
Set f=fso.createTextFile(Server.MapPath("list_"&j&".html"),true) 

'寫入網(wǎng)頁(yè)內(nèi)容 
f.WriteLine strHead&str0&ref 
f.close 
response.write "正在生成第"&j&"個(gè)頁(yè)面!<br>" 
%><% 
next%>

相關(guān)文章

最新評(píng)論

武隆县| 上虞市| 嘉义市| 视频| 怀化市| 灵川县| 张家港市| 剑河县| 织金县| 柯坪县| 九台市| 林甸县| 萍乡市| 贡觉县| 鹤峰县| 仙桃市| 汨罗市| 孟州市| 虹口区| 和田县| 浏阳市| 鄂伦春自治旗| 汪清县| 太原市| 札达县| 马龙县| 郸城县| 宝坻区| 驻马店市| 同江市| 随州市| 莆田市| 巴楚县| 南安市| 吐鲁番市| 习水县| 曲周县| 高安市| 丹凤县| 阿鲁科尔沁旗| 若羌县|